implements `distinct with/without X, Y`

This still doesn't work quite right, because some common operations like array
indexing lay completely outside the scope/symbol lookup system - they are not
even magics.
This commit is contained in:
Zahary Karadjov 2014-03-20 01:15:20 +02:00
commit 8a0509b3b2
5 changed files with 72 additions and 27 deletions

View file

@ -188,6 +188,10 @@ type
nkStmtListType, # a statement list ending in a type; for macros
nkBlockType, # a statement block ending in a type; for macros
# types as syntactic trees:
nkWith, # distinct with `foo`
nkWithout, # distinct without `foo`
nkTypeOfExpr, # type(1+2)
nkObjectTy, # object body
nkTupleTy, # tuple body
@ -418,7 +422,7 @@ type
nfExplicitCall # x.y() was used instead of x.y
nfExprCall # this is an attempt to call a regular expression
nfIsRef # this node is a 'ref' node; used for the VM
TNodeFlags* = set[TNodeFlag]
TTypeFlag* = enum # keep below 32 for efficiency reasons (now: 23)
tfVarargs, # procedure has C styled varargs