summary refs log tree commit diff stats
path: root/compiler/rst.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-30 19:51:51 +0100
committerAraq <rumpf_a@web.de>2011-11-30 19:51:51 +0100
commitab5621a62bc670c0d1647df6322f70f26f054e8e (patch)
treeb6f42b73ee1fd9e6ff69dedb2a839af0da9e4332 /compiler/rst.nim
parent7d2466638e5170946e862f0beaddcece93c05fe7 (diff)
downloadNim-ab5621a62bc670c0d1647df6322f70f26f054e8e.tar.gz
bugfix: don't process arguments that are to be passed to the produced exe
Diffstat (limited to 'compiler/rst.nim')
-rwxr-xr-xcompiler/rst.nim13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rst.nim b/compiler/rst.nim
index 87a5e194e..a784e9a9f 100755
--- a/compiler/rst.nim
+++ b/compiler/rst.nim
@@ -265,7 +265,8 @@ type
                                  # current document. 
                                  # This is for single underline adornments.
     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.
   
   PSharedState = ref TSharedState
@@ -819,8 +820,8 @@ proc parseComment(p: var TRstParser): PRstNode =
 
 type 
   TDirKind = enum             # must be ordered alphabetically!
-    dkNone, dkAuthor, dkAuthors, dkCodeBlock, dkContainer, dkContents, dkFigure, 
-    dkImage, dkInclude, dkIndex, dkRaw, dkTitle
+    dkNone, dkAuthor, dkAuthors, dkCodeBlock, dkContainer, dkContents,
+    dkFigure, dkImage, dkInclude, dkIndex, dkRaw, dkTitle
 
 const 
   DirIds: array[0..11, string] = ["", "author", "authors", "code-block", 
@@ -1103,7 +1104,7 @@ proc parseSimpleTable(p: var TRstParser): PRstNode =
       getColumns(p, cols)
       setlen(row, len(cols))
       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 
     for j in countup(0, high(row)): row[j] = ""
     # 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): 
         inc(p.idx)
         j = tokenAfterNewLine(p) - 1
-        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): 
+        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: 
           nil
         else: 
           break