Le 29/10/2015 16:32, stepharo a écrit :
2015-10-28 16:19 GMT+01:00 stepharo <<mailto:[email protected]>[email protected]>: I see this is annoying that comments are not polymorphic. They could be :) - an empty RBMethodNode with a comment attribute, or - a comment: message send with the comment as a parameter.Would be nice to have a tree node ClassComment You have RGCommentDefinition, no?And RBComment So we should probably use them.The static representation of Pharo program can really be improved. I still want a full package. RGPackage? Or a unified AST-like structure? Even an AST is not that cool as a program representation.I'm thorn because on one hand I would like to be able to express a visitor for the complete compilation unit and in particular package and extensions but may be we do not need to have this nodes and just have an object. I would be favor to have a nice and full AST representation of the compilation unit.
Well, you can unify Ring and RBMethodNode from the point of view of the visitor: you're not in Java where typing could be an issue.
Note that I have a structure + visitor for the above AST level implemented in the AltBrowser (covers groups of groups of packages, packages, package tags, classes, extensions, protocols, methods, comments).
Thierry
