bugfix: don't process arguments that are to be passed to the produced exe
This commit is contained in:
parent
7d2466638e
commit
ab5621a62b
4 changed files with 29 additions and 18 deletions
|
|
@ -37,17 +37,18 @@ proc ProcessCmdLine(pass: TCmdLinePass) =
|
||||||
ProcessSwitch(key, val, pass, gCmdLineInfo)
|
ProcessSwitch(key, val, pass, gCmdLineInfo)
|
||||||
else:
|
else:
|
||||||
ProcessSwitch(p.key, p.val, pass, gCmdLineInfo)
|
ProcessSwitch(p.key, p.val, pass, gCmdLineInfo)
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
if pass == passCmd1:
|
if pass != passCmd1: break
|
||||||
if options.command == "":
|
if options.command == "":
|
||||||
options.command = p.key
|
options.command = p.key
|
||||||
else:
|
else:
|
||||||
options.commandArgs.add p.key
|
options.commandArgs.add p.key
|
||||||
|
|
||||||
if options.gProjectName == "":
|
if options.gProjectName == "":
|
||||||
# support UNIX style filenames anywhere for portable build scripts:
|
# support UNIX style filenames anywhere for portable build scripts:
|
||||||
options.gProjectName = unixToNativePath(p.key)
|
options.gProjectName = unixToNativePath(p.key)
|
||||||
arguments = cmdLineRest(p)
|
arguments = cmdLineRest(p)
|
||||||
|
break
|
||||||
|
|
||||||
if pass == passCmd2:
|
if pass == passCmd2:
|
||||||
if optRun notin gGlobalOptions and arguments != "":
|
if optRun notin gGlobalOptions and arguments != "":
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,8 @@ type
|
||||||
# current document.
|
# current document.
|
||||||
# This is for single underline adornments.
|
# This is for single underline adornments.
|
||||||
overlineToLevel*: TLevelMap # Saves for each possible title adornment
|
overlineToLevel*: TLevelMap # Saves for each possible title adornment
|
||||||
# character its level in the current document.
|
# character its level in the current
|
||||||
|
# document.
|
||||||
# This is for over-underline adornments.
|
# This is for over-underline adornments.
|
||||||
|
|
||||||
PSharedState = ref TSharedState
|
PSharedState = ref TSharedState
|
||||||
|
|
@ -819,8 +820,8 @@ proc parseComment(p: var TRstParser): PRstNode =
|
||||||
|
|
||||||
type
|
type
|
||||||
TDirKind = enum # must be ordered alphabetically!
|
TDirKind = enum # must be ordered alphabetically!
|
||||||
dkNone, dkAuthor, dkAuthors, dkCodeBlock, dkContainer, dkContents, dkFigure,
|
dkNone, dkAuthor, dkAuthors, dkCodeBlock, dkContainer, dkContents,
|
||||||
dkImage, dkInclude, dkIndex, dkRaw, dkTitle
|
dkFigure, dkImage, dkInclude, dkIndex, dkRaw, dkTitle
|
||||||
|
|
||||||
const
|
const
|
||||||
DirIds: array[0..11, string] = ["", "author", "authors", "code-block",
|
DirIds: array[0..11, string] = ["", "author", "authors", "code-block",
|
||||||
|
|
@ -1103,7 +1104,7 @@ proc parseSimpleTable(p: var TRstParser): PRstNode =
|
||||||
getColumns(p, cols)
|
getColumns(p, cols)
|
||||||
setlen(row, len(cols))
|
setlen(row, len(cols))
|
||||||
if a != nil:
|
if a != nil:
|
||||||
for j in countup(0, rsonsLen(a) - 1): a.sons[j].kind = rnTableHeaderCell
|
for j in 0..rsonsLen(a)-1: a.sons[j].kind = rnTableHeaderCell
|
||||||
if p.tok[p.idx].kind == tkEof: break
|
if p.tok[p.idx].kind == tkEof: break
|
||||||
for j in countup(0, high(row)): row[j] = ""
|
for j in countup(0, high(row)): row[j] = ""
|
||||||
# the following while loop iterates over the lines a single cell may span:
|
# the following while loop iterates over the lines a single cell may span:
|
||||||
|
|
@ -1236,8 +1237,8 @@ proc parseDefinitionList(p: var TRstParser): PRstNode =
|
||||||
if (p.tok[p.idx].kind == tkIndent) and (p.tok[p.idx].ival == col):
|
if (p.tok[p.idx].kind == tkIndent) and (p.tok[p.idx].ival == col):
|
||||||
inc(p.idx)
|
inc(p.idx)
|
||||||
j = tokenAfterNewLine(p) - 1
|
j = tokenAfterNewLine(p) - 1
|
||||||
if (j >= 1) and (p.tok[j].kind == tkIndent) and (p.tok[j].ival > col) and
|
if j >= 1 and p.tok[j].kind == tkIndent and p.tok[j].ival > col and
|
||||||
(p.tok[j - 1].symbol != "::") and (p.tok[j + 1].kind != tkIndent):
|
p.tok[j-1].symbol != "::" and p.tok[j+1].kind != tkIndent:
|
||||||
nil
|
nil
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -349,8 +349,7 @@ input management. To start Nimrod in interactive mode use the command
|
||||||
``nimrod i``. To quit use the ``quit()`` command. To determine whether an input
|
``nimrod i``. To quit use the ``quit()`` command. To determine whether an input
|
||||||
line is an incomplete statement to be continued these rules are used:
|
line is an incomplete statement to be continued these rules are used:
|
||||||
|
|
||||||
1. The line ends with ``[-+*/\\<>!\?\|%&$@~,;:=#^]\s*$`` (operator symbol
|
1. The line ends with ``[-+*/\\<>!\?\|%&$@~,;:=#^]\s*$`` (operator symbol followed by optional whitespace).
|
||||||
followed by optional whitespace).
|
|
||||||
2. The line starts with a space (indentation).
|
2. The line starts with a space (indentation).
|
||||||
3. The line is within a triple quoted string literal. However, the detection
|
3. The line is within a triple quoted string literal. However, the detection
|
||||||
does not work if the line contains more than one ``"""``.
|
does not work if the line contains more than one ``"""``.
|
||||||
|
|
@ -402,6 +401,12 @@ However it is not efficient to do:
|
||||||
.. code-block:: Nimrod
|
.. code-block:: Nimrod
|
||||||
var s = varA # assignment has to copy the whole string into a new buffer!
|
var s = varA # assignment has to copy the whole string into a new buffer!
|
||||||
|
|
||||||
|
For ``let`` symbols a copy is not always necessary:
|
||||||
|
|
||||||
|
.. code-block:: Nimrod
|
||||||
|
let s = varA # may only copy a pointer if it safe to do so
|
||||||
|
|
||||||
|
|
||||||
The compiler optimizes string case statements: A hashing scheme is used for them
|
The compiler optimizes string case statements: A hashing scheme is used for them
|
||||||
if several different string constants are used. So code like this is reasonably
|
if several different string constants are used. So code like this is reasonably
|
||||||
efficient:
|
efficient:
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,8 @@ if [ $# -eq 1 ] ; then
|
||||||
chmod 644 $docdir/tut2.txt
|
chmod 644 $docdir/tut2.txt
|
||||||
cp doc/intern.html $docdir/intern.html || exit 1
|
cp doc/intern.html $docdir/intern.html || exit 1
|
||||||
chmod 644 $docdir/intern.html
|
chmod 644 $docdir/intern.html
|
||||||
|
cp doc/manual.html $docdir/manual.html || exit 1
|
||||||
|
chmod 644 $docdir/manual.html
|
||||||
cp doc/nimrodc.html $docdir/nimrodc.html || exit 1
|
cp doc/nimrodc.html $docdir/nimrodc.html || exit 1
|
||||||
chmod 644 $docdir/nimrodc.html
|
chmod 644 $docdir/nimrodc.html
|
||||||
cp doc/mytest.cfg $docdir/mytest.cfg || exit 1
|
cp doc/mytest.cfg $docdir/mytest.cfg || exit 1
|
||||||
|
|
@ -242,6 +244,8 @@ if [ $# -eq 1 ] ; then
|
||||||
chmod 644 $libdir/pure/encodings.nim
|
chmod 644 $libdir/pure/encodings.nim
|
||||||
cp lib/pure/events.nim $libdir/pure/events.nim || exit 1
|
cp lib/pure/events.nim $libdir/pure/events.nim || exit 1
|
||||||
chmod 644 $libdir/pure/events.nim
|
chmod 644 $libdir/pure/events.nim
|
||||||
|
cp lib/pure/ftpclient.nim $libdir/pure/ftpclient.nim || exit 1
|
||||||
|
chmod 644 $libdir/pure/ftpclient.nim
|
||||||
cp lib/pure/gentabs.nim $libdir/pure/gentabs.nim || exit 1
|
cp lib/pure/gentabs.nim $libdir/pure/gentabs.nim || exit 1
|
||||||
chmod 644 $libdir/pure/gentabs.nim
|
chmod 644 $libdir/pure/gentabs.nim
|
||||||
cp lib/pure/hashes.nim $libdir/pure/hashes.nim || exit 1
|
cp lib/pure/hashes.nim $libdir/pure/hashes.nim || exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue