SmaCC icon indicating copy to clipboard operation
SmaCC copied to clipboard

A nice way to navigate AST in the inspector

Open NicolasAnquetil opened this issue 1 month ago • 2 comments

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: image

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

NicolasAnquetil avatar Jan 08 '25 15:01 NicolasAnquetil