summary refs log tree commit diff stats
path: root/doc/grammar.txt
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-09-24 16:07:07 +0200
committerAraq <rumpf_a@web.de>2013-09-24 16:07:07 +0200
commit8b5aa221adc9946894225dc569bac9d2d8bdde6d (patch)
tree4affd857c41c15ed3ba4e0d2c210b69f30664489 /doc/grammar.txt
parent83584bf88934c45ce10e770ee15d070a09f88f45 (diff)
downloadNim-8b5aa221adc9946894225dc569bac9d2d8bdde6d.tar.gz
support for multiple modules of the same name; niminst supports 'platforms'; minor bugfixes
Diffstat (limited to 'doc/grammar.txt')
-rw-r--r--doc/grammar.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index 741e9b907..7fe2b56aa 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -104,11 +104,12 @@ exprStmt = simpleExpr
                           | IND{=} 'except' exprList ':' stmt
                           | IND{=} 'else' ':' stmt )*
            ))?
-importStmt = 'import' optInd expr
-              ((comma expr)*
+moduleName = expr ('as' expr)?
+importStmt = 'import' optInd moduleName
+              ((comma moduleName)*
               / 'except' optInd (expr ^+ comma))
 includeStmt = 'include' optInd expr ^+ comma
-fromStmt = 'from' expr 'import' optInd expr (comma expr)*
+fromStmt = 'from' moduleName 'import' optInd expr (comma expr)*
 returnStmt = 'return' optInd expr?
 raiseStmt = 'raise' optInd expr?
 yieldStmt = 'yield' optInd expr?