|
Fixed in rev. 3124 I think it would be real nice if a child macro could access the parent macro (and its variables) as if it was a nested class, ie: macro choco:
isYummy = [| $(choco.Arguments[0]) |]
macro bar:
yield [|
if choco.isYummy:
print "yummy chocolate bar"
else:
print "average chocolate bar"
|]
It avoids code duplication to handle/process/inspect state of the parent macro from within each child macro. Well, it might now be possible in the depthFirst scenario... but at least getting 'choco' from 'bar' would be handy (instead of doing something like choco = bar.ParentNode.ParentNode as MacroStatement etc) Ability to reference to parent macro(s) added in rev. 3135 |
||||||||||||||||||||||||||||||||||||||
Superb.
Would it be possible to have nice error reporting that displays the possible 'parents' for the macro?