Inspiration
I was a new person on some complex Java project, and I struggled to follow the dependency chain. Thus I feel like this is apt.
What it does
It visualizes type dependencies in a Java project.
How I built it
With rust, the logic is WASM so there exists no reason to communicate to backend. The lexer is simple since it is REGEX. The parser is made via recursive descent and some tricks to skip unimportant sections. Name resolution is done via typical scope analysis. Frontend is ElkJS for the graph node placement algorithm and put them on React flow.
Challenges I ran into
This is a typical challenge when parsing Java: the generic angle bracket rule. Suppose we see the following:
IDENT "<" IDENT
Do we know that if this is the case for LT operator, e.g.
ThisNumber < ThatNumber
Or if it is a generic, e.g.
List<Integer...
Thus we have to remake the language to not be CFL anymore.
What I learned
This project was my first language tooling project, and I should have offloaded more "stuffs" into the semantic analysis case.
What's next for VisualizeJava
This project does what I need it to do for Java 8 stuffs, so I will use it but not maintain it long term. Although I will play around with more and more projects.
Log in or sign up for Devpost to join the conversation.