Because like that we have a correct and nice hierarchy and all the nodes inherits from it and we can have a nice visitor and make assumption about the root. Regularity is nice and it helps controlling complexity. Why a comment could not have a parent? Stef Le 3/11/16 à 14:53, John Brant a écrit :
Why convert it to a node? It has no affect on the running code.
John Brant
On Nov 3, 2016, at 8:23 AM, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-11-03 13:41 GMT+01:00 stepharo <stepharo@free.fr>: Hi marcus et al
why RBComment is not called RBCommentNode and why it is not a subclass of RBNode?
Stef
RBComment wasn't part of the original RefactoringBrowser, it only had a "comments" instance variable on its nodes. This was refactored out to its own RBComment class (I think). But no "real" AST-Node class.
+1 for converting this into a real AST node.