nimsuggest: suggest types in a type section
This commit is contained in:
parent
f162ff7773
commit
b414806e66
4 changed files with 23 additions and 3 deletions
|
|
@ -717,7 +717,11 @@ proc typeSectionLeftSidePass(c: PContext, n: 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 == cmdIdeTools: suggestStmt(c, a)
|
||||
when defined(nimsuggest):
|
||||
if gCmd == cmdIdeTools:
|
||||
inc c.inTypeContext
|
||||
suggestStmt(c, a)
|
||||
dec c.inTypeContext
|
||||
if a.kind == nkCommentStmt: continue
|
||||
if a.kind != nkTypeDef: illFormedAst(a)
|
||||
checkSonsLen(a, 3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue