include statement is not restricted to top level statements anymore
This commit is contained in:
parent
9fb97e310f
commit
0dc92960d2
1 changed files with 1 additions and 1 deletions
|
|
@ -2343,7 +2343,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
||||||
if not isTopLevel(c): localError(n.info, errXOnlyAtModuleScope, "from")
|
if not isTopLevel(c): localError(n.info, errXOnlyAtModuleScope, "from")
|
||||||
result = evalFrom(c, n)
|
result = evalFrom(c, n)
|
||||||
of nkIncludeStmt:
|
of nkIncludeStmt:
|
||||||
if not isTopLevel(c): localError(n.info, errXOnlyAtModuleScope, "include")
|
#if not isTopLevel(c): localError(n.info, errXOnlyAtModuleScope, "include")
|
||||||
result = evalInclude(c, n)
|
result = evalInclude(c, n)
|
||||||
of nkExportStmt, nkExportExceptStmt:
|
of nkExportStmt, nkExportExceptStmt:
|
||||||
if not isTopLevel(c): localError(n.info, errXOnlyAtModuleScope, "export")
|
if not isTopLevel(c): localError(n.info, errXOnlyAtModuleScope, "export")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue