[dmd-internals] Add a ghostNode Hierachy ?
Stefan Koch via dmd-internals
dmd-internals at puremagic.com
Mon Jun 6 14:44:59 PDT 2016
Hi,
In DMD's AST we have something I'd like to call gohstNodes.
That is nodes which get lowered into others.
For example a the foreach-loop, the do while, while and do until
loop.
Are all lowered into a for loop.
making the others into a ghost node which is never supposed to
appear.
yet every visitor checks for them explicitly.
If all of those were a subclass of ghostnode which in turn would
be a subclass of RootObject.
Then one visit overload would suffice to catch them all.
More information about the dmd-internals
mailing list