--stdout support; idetools implemented
This commit is contained in:
parent
0a4498bd6b
commit
f8dd74a073
17 changed files with 188 additions and 112 deletions
|
|
@ -275,7 +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 gCmd == cmdIdeTools: suggestStmt(c, a)
|
||||
if a.kind == nkCommentStmt: continue
|
||||
if (a.kind != nkIdentDefs) and (a.kind != nkVarTuple): IllFormedAst(a)
|
||||
checkMinSonsLen(a, 3)
|
||||
|
|
@ -332,7 +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 gCmd == cmdIdeTools: suggestStmt(c, a)
|
||||
if a.kind == nkCommentStmt: continue
|
||||
if (a.kind != nkConstDef): IllFormedAst(a)
|
||||
checkSonsLen(a, 3)
|
||||
|
|
@ -485,7 +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 gCmd == cmdIdeTools: suggestStmt(c, a)
|
||||
if a.kind == nkCommentStmt: continue
|
||||
if a.kind != nkTypeDef: IllFormedAst(a)
|
||||
checkSonsLen(a, 3)
|
||||
|
|
@ -795,7 +795,7 @@ proc SemStmt(c: PContext, n: PNode): PNode =
|
|||
const # must be last statements in a block:
|
||||
LastBlockStmts = {nkRaiseStmt, nkReturnStmt, nkBreakStmt, nkContinueStmt}
|
||||
result = n
|
||||
if gCmd == cmdSuggest:
|
||||
if gCmd == cmdIdeTools:
|
||||
suggestStmt(c, n)
|
||||
if nfSem in n.flags: return
|
||||
case n.kind
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue