SmaCC
SmaCC copied to clipboard
A nice way to navigate AST in the inspector
Hello, this is something we use to navigate ASTs in Moose. Don't know if you already saw this or if you already have something similar.
Anyway, I am showing here a small example for CPPFunctionDefinitionNode:
We might use your SmaCC Cpp parser in the future and if we do, I propose to generalize this to all nodes. It requires:
- defining
inspectionSmaccAST
for some "top nodes" (classes, methods, functions) - having
children
in all nodes -
and having
inspectionSmaccASTSourceCode
in Smacc top node, but this is already done here for CPPProgramNode
cheers