using statement (ala C#) implemented as macro (added as test).
simplified the usage of the interpolatedFragments iterator.
This commit is contained in:
parent
dbcca9b3b9
commit
9acfc43119
5 changed files with 152 additions and 49 deletions
|
|
@ -1381,6 +1381,7 @@ proc parseString(s: string, filename: string = "", line: int = 0): PNode =
|
|||
|
||||
var parser : TParser
|
||||
OpenParser(parser, filename, stream)
|
||||
|
||||
|
||||
result = parser.parseAll
|
||||
CloseParser(parser)
|
||||
|
||||
|
|
|
|||
|
|
@ -903,7 +903,7 @@ proc semExpandMacroToAst(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
|||
|
||||
var s = qualifiedLookup(c, macroCall.sons[0], {checkUndeclared})
|
||||
if s == nil:
|
||||
GlobalError(n.info, errUndeclaredIdentifier, macroCall.sons[0].strVal)
|
||||
GlobalError(n.info, errUndeclaredIdentifier, macroCall.sons[0].renderTree)
|
||||
|
||||
var expanded : Pnode
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue