Closed breck7 closed 1 month ago
Added app.program.toSideBySide([app.program.toDefinitionLineNumberTree()]).toString()
for now.
Just need to add UI for it. The toDefinitionLineNumberTree
method replaces the cells with the line number the cellType definition appears on. I also prefixed each line to include the line # the nodeTypeDefinition is defined on.
Should add this is from feedback from ZK.
Also, for next steps after the UI is done, potential for something cool. "It's kind of neat actually, the fact that the definitionLineNumber tree has the same shape as the actual source code. Makes me think you could create a powerful 3D visualization type, where you would have the grammar on one plane, the source code on another, and then simply draw lines connecting each word in the program to it's definition line in the grammar."
Would be neat but low pri
Perhaps right click, add a context menu. Go to nodeType definition as well as goto cellType definition.
For "extends" keywords in grammar, perhaps a goto definition as well.