Merge pull request #44 from keitahaga/compiler

c2nim, c2pas: fix '--out' option
This commit is contained in:
Araq 2011-07-29 13:10:06 -07:00
commit 8f0a5c7bec
2 changed files with 13 additions and 13 deletions

View file

@ -61,10 +61,10 @@ for kind, key, val in getopt():
of "version", "v": of "version", "v":
stdout.write(Version & "\n") stdout.write(Version & "\n")
quit(0) quit(0)
of "o", "out": outfile = key of "o", "out": outfile = val
else: else:
if not parserOptions.setOption(key, val): if not parserOptions.setOption(key, val):
stdout.write("[Error] unknown option: " & key) stdout.writeln("[Error] unknown option: " & key)
of cmdEnd: assert(false) of cmdEnd: assert(false)
if infile.len == 0: if infile.len == 0:
# no filename has been given, so we show the help: # no filename has been given, so we show the help:

View file

@ -49,10 +49,10 @@ for kind, key, val in getopt():
of "version", "v": of "version", "v":
stdout.write(Version & "\n") stdout.write(Version & "\n")
quit(0) quit(0)
of "o", "out": outfile = key of "o", "out": outfile = val
of "ref": incl(flags, pfRefs) of "ref": incl(flags, pfRefs)
of "boot": flags = flags + {pfRefs, pfMoreReplacements, pfImportBlackList} of "boot": flags = flags + {pfRefs, pfMoreReplacements, pfImportBlackList}
else: stdout.write("[Error] unknown option: " & key) else: stdout.writeln("[Error] unknown option: " & key)
of cmdEnd: assert(false) of cmdEnd: assert(false)
if infile.len == 0: if infile.len == 0:
# no filename has been given, so we show the help: # no filename has been given, so we show the help: