implemented 'experimental' switch
This commit is contained in:
parent
e27ab36731
commit
4b7de4dc5e
12 changed files with 49 additions and 7 deletions
|
|
@ -312,3 +312,8 @@ proc checkSonsLen*(n: PNode, length: int) =
|
|||
proc checkMinSonsLen*(n: PNode, length: int) =
|
||||
if sonsLen(n) < length: illFormedAst(n)
|
||||
|
||||
proc isTopLevel*(c: PContext): bool {.inline.} =
|
||||
result = c.currentScope.depthLevel <= 2
|
||||
|
||||
proc experimentalMode*(c: PContext): bool {.inline.} =
|
||||
result = gExperimentalMode or sfExperimental in c.module.flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue