diff options
author | rumpf_a@web.de <> | 2010-01-24 23:34:10 +0100 |
---|---|---|
committer | rumpf_a@web.de <> | 2010-01-24 23:34:10 +0100 |
commit | 5eea125ba73a5768a264c5d4fc8cc55fba8d5fe8 (patch) | |
tree | 9fc4fbef4ed5f672d7bd6842d487de33298ca73d /rod/pas2nim | |
parent | 6bbed25d14c674837c40e761753e2bf6e26b1db2 (diff) | |
download | Nim-5eea125ba73a5768a264c5d4fc8cc55fba8d5fe8.tar.gz |
devel libs added
Diffstat (limited to 'rod/pas2nim')
-rwxr-xr-x | rod/pas2nim/pas2nim.nim | 2 | ||||
-rwxr-xr-x | rod/pas2nim/pasparse.nim | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/rod/pas2nim/pas2nim.nim b/rod/pas2nim/pas2nim.nim index b41455d6d..5c7b68857 100755 --- a/rod/pas2nim/pas2nim.nim +++ b/rod/pas2nim/pas2nim.nim @@ -29,7 +29,7 @@ proc main(infile, outfile: string, flags: set[TParserFlag]) = var stream = LLStreamOpen(infile, fmRead) if stream == nil: rawMessage(errCannotOpenFile, infile) var p: TParser - OpenParser(p, infile, stream, flags) + openParser(p, infile, stream, flags) var module = parseUnit(p) closeParser(p) renderModule(module, outfile) diff --git a/rod/pas2nim/pasparse.nim b/rod/pas2nim/pasparse.nim index 14d02518c..427cdc5ef 100755 --- a/rod/pas2nim/pasparse.nim +++ b/rod/pas2nim/pasparse.nim @@ -1343,9 +1343,7 @@ proc parseVar(p: var TParser): PNode = p.lastVarSection = result proc parseRoutine(p: var TParser): PNode = - var - stmts: PNode - noBody: bool + var noBody: bool result = newNodeP(nkProcDef, p) getTok(p) skipCom(p, result) @@ -1358,7 +1356,7 @@ proc parseRoutine(p: var TParser): PNode = if (p.section == seInterface) or noBody: addSon(result, nil) else: - stmts = newNodeP(nkStmtList, p) + var stmts = newNodeP(nkStmtList, p) while true: case p.tok.xkind of pxVar: addSon(stmts, parseVar(p)) @@ -1374,7 +1372,6 @@ proc parseRoutine(p: var TParser): PNode = addSon(result, stmts) proc fixExit(p: var TParser, n: PNode): bool = - result = false if (p.tok.ident.id == getIdent("exit").id): var length = sonsLen(n) if (length <= 0): return |