Add base class for all AST nodes#9408
Conversation
|
Thanks for your pull request and interest in making D better, @jacob-carlborg! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#9408" |
029fbb6 to
2dc0072
Compare
|
Blocks #9409. |
|
I don't understand. The root object is already RootObject. Why add another layer? |
I thought RootObject was the base class for all classes, regardless if the class is part of the AST or not. Only classes that are part of the AST should inherit from As you can see I've added the |
2dc0072 to
ba5cea7
Compare
This is useful to be able to handle all AST nodes the same way, i.e. in an array. Common code for all AST nodes can also be placed here.
ba5cea7 to
8a13c0c
Compare
This is useful to be able to handle all AST nodes the same way, i.e. in an array. Common code for all AST nodes can also be placed here.