summary refs log tree commit diff stats
path: root/rod
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-02-21 01:07:12 +0100
committerAraq <rumpf_a@web.de>2011-02-21 01:07:12 +0100
commit4e7a22cac31a0a703c080c7fe0d2569f56ab16a0 (patch)
treeb9f94a283d6b6729d5c240b221054a248ab1cec1 /rod
parent7bc95676acd732e0ba264dcc857a671657edc4d9 (diff)
downloadNim-4e7a22cac31a0a703c080c7fe0d2569f56ab16a0.tar.gz
somewhat better 'suggest'
Diffstat (limited to 'rod')
-rwxr-xr-xrod/options.nim3
-rwxr-xr-xrod/semgnrc.nim1
-rwxr-xr-xrod/semstmts.nim3
3 files changed, 5 insertions, 2 deletions
diff --git a/rod/options.nim b/rod/options.nim
index b2bf7fed9..9dc2b235e 100755
--- a/rod/options.nim
+++ b/rod/options.nim
@@ -104,7 +104,6 @@ proc existsConfigVar*(key: string): bool
 proc getConfigVar*(key: string): string
 proc setConfigVar*(key, val: string)
 proc addImplicitMod*(filename: string)
-proc getOutFile*(filename, ext: string): string
 proc binaryStrSearch*(x: openarray[string], y: string): int
 # implementation
 
@@ -117,7 +116,7 @@ proc getConfigVar(key: string): string =
 proc setConfigVar(key, val: string) = 
   nstrtabs.put(gConfigVars, key, val)
 
-proc getOutFile(filename, ext: string): string = 
+proc getOutFile*(filename, ext: string): string = 
   if options.outFile != "": result = options.outFile
   else: result = changeFileExt(filename, ext)
   
diff --git a/rod/semgnrc.nim b/rod/semgnrc.nim
index 77c200120..00ad3fdc9 100755
--- a/rod/semgnrc.nim
+++ b/rod/semgnrc.nim
@@ -67,6 +67,7 @@ proc semGenericStmt(c: PContext, n: PNode, flags: TSemGenericFlags = {}): PNode
     L: int
     a: PNode
   result = n
+  if gCmd == cmdSuggest: suggestStmt(c, n)
   case n.kind
   of nkIdent:
     var s = SymtabGet(c.Tab, n.ident)
diff --git a/rod/semstmts.nim b/rod/semstmts.nim
index eb4a51b51..801542d17 100755
--- a/rod/semstmts.nim
+++ b/rod/semstmts.nim
@@ -275,6 +275,7 @@ proc semVar(c: PContext, n: PNode): PNode =
   result = copyNode(n)
   for i in countup(0, sonsLen(n)-1): 
     var a = n.sons[i]
+    if gCmd == cmdSuggest: suggestStmt(c, a)
     if a.kind == nkCommentStmt: continue 
     if (a.kind != nkIdentDefs) and (a.kind != nkVarTuple): IllFormedAst(a)
     checkMinSonsLen(a, 3)
@@ -331,6 +332,7 @@ proc semConst(c: PContext, n: PNode): PNode =
   result = copyNode(n)
   for i in countup(0, sonsLen(n) - 1): 
     var a = n.sons[i]
+    if gCmd == cmdSuggest: suggestStmt(c, a)
     if a.kind == nkCommentStmt: continue 
     if (a.kind != nkConstDef): IllFormedAst(a)
     checkSonsLen(a, 3)
@@ -483,6 +485,7 @@ proc SemTypeSection(c: PContext, n: PNode): PNode =
   # we even look at the type definitions on the right
   for i in countup(0, sonsLen(n) - 1): 
     var a = n.sons[i]
+    if gCmd == cmdSuggest: suggestStmt(c, a)
     if a.kind == nkCommentStmt: continue 
     if a.kind != nkTypeDef: IllFormedAst(a)
     checkSonsLen(a, 3)