top level closures should work; transf is not a pass anymore; next steps for first class iterator support

This commit is contained in:
Araq 2012-08-13 17:07:49 +02:00
commit 244c14db0b
17 changed files with 293 additions and 229 deletions

View file

@ -340,7 +340,8 @@ type
# because for instantiations of objects, structural
# type equality has to be used
tfAll, # type class requires all constraints to be met (default)
tfAny # type class requires any constraint to be met
tfAny, # type class requires any constraint to be met
tfCapturesEnv # whether proc really captures some environment
TTypeFlags* = set[TTypeFlag]
@ -867,6 +868,7 @@ proc newNode*(kind: TNodeKind, info: TLineInfo, sons: TNodeSeq = @[],
result = newNode(kind)
result.info = info
result.typ = typ
# XXX use shallowCopy here for ownership transfer:
result.sons = sons
proc newNodeIT(kind: TNodeKind, info: TLineInfo, typ: PType): PNode =