implemented 'import except'

This commit is contained in:
Araq 2012-11-28 23:54:23 +01:00
commit 92e10e4b18
14 changed files with 120 additions and 95 deletions

View file

@ -1850,6 +1850,9 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
of nkImportStmt:
if not isTopLevel(c): LocalError(n.info, errXOnlyAtModuleScope, "import")
result = evalImport(c, n)
of nkImportExceptStmt:
if not isTopLevel(c): LocalError(n.info, errXOnlyAtModuleScope, "import")
result = evalImportExcept(c, n)
of nkFromStmt:
if not isTopLevel(c): LocalError(n.info, errXOnlyAtModuleScope, "from")
result = evalFrom(c, n)