mike-lischke / vscode-antlr4

ANTLR4 language support for Visual Studio Code
http://www.soft-gems.net
MIT License
415 stars 58 forks source link

Parse Tree d3 Source #148

Closed hazmat345 closed 2 years ago

hazmat345 commented 2 years ago

Hello,

First, thanks for this extension, it's been extremely helpful!

I was able to get all the visualizations to work out of the box except for the Parse Tree. The root problem was that I'm running in an environment that can't resolve the script source in ParseTreeProvider.ts:

<script src="https://d3js.org/d3.v4.min.js"></script>

I grabbed that file and put it in a location I can resolve. Then I modified that line to point to it and everything worked.

It looks like the ATNGraphProvider and CallGraphProvider are using a bundled d3. Would it be possible to modify the ParseTreeProvider to work in a similar way?

I'd be up for making a PR if that would help.

Thanks!

mike-lischke commented 2 years ago

Hi @hazmat345, I probably just forgot to change the parse tree code to use the D3.js library from the node_modules. I will gladly accept a PR if you could change and test that. Also, if you have any other improvement then let me know!