diff options
author | Araq <rumpf_a@web.de> | 2015-09-08 10:19:12 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-08 10:22:15 +0200 |
commit | 494431e3b4bd6068d3457dbd61eb2670336096b0 (patch) | |
tree | edc69506562e6b66fafa8125f08adf2fe95ba940 | |
parent | 833a9344fad91a0ccf827e7dedcb41aa3eb2665a (diff) | |
download | Nim-494431e3b4bd6068d3457dbd61eb2670336096b0.tar.gz |
gangbang support for NimScript
-rw-r--r-- | compiler/commands.nim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index dba117516..6b2f074e8 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -645,11 +645,18 @@ proc processSwitch*(pass: TCmdLinePass; p: OptParser) = proc processArgument*(pass: TCmdLinePass; p: OptParser; argsCount: var int): bool = if argsCount == 0: - if pass != passCmd2: options.command = p.key + # nim filename.nims is the same as "nim e filename.nims": + if p.key.endswith(".nims"): + options.command = "e" + options.gProjectName = unixToNativePath(p.key) + arguments = cmdLineRest(p) + result = true + elif pass != passCmd2: + options.command = p.key else: if pass == passCmd1: options.commandArgs.add p.key if argsCount == 1: - # support UNIX style filenames anywhere for portable build scripts: + # support UNIX style filenames everywhere for portable build scripts: options.gProjectName = unixToNativePath(p.key) arguments = cmdLineRest(p) result = true |