Closed tintinweb closed 2 years ago
wdyt @bigbug?
added a new DotParser.ts
that builds a vscode symbol tree for the outline. it currently breaks other symbol functionality. just created this as a PoC. would be great to get your input on whether we want to go forward using the parser for all symbol related things. thanks!
I think the question here is what happens on syntax errors. Is the AST stable enough to handle this as well? The regex code is very fault tolerant.
In another extension I am only updating the AST on file change. If the parser bails we can show it in the problem view but keep the symbol tree. It will not be super accurate but should work most of the time. I agree that we should try to gratefully parse the code and not cause too much inconvenience while typing 🙌 let's explore this and decide if we want to use the parser.
There seems to be a problem with html elements. See example3.dot
Current problem: The AST seems to not recognise nodes which have been defined within an edge:
DotParser now recognises edges and the nodes below.
looks good!
going to merge this in the meantime 🥳
refs #95