Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will output a file in DOT format that you can feed to Graphviz <http://www.graphviz.org/> to graphically inspect ASTs generated by Parser#parse. It is a quick hack and there are many possible improvements. Each SyntaxNode is assigned a unique integer id in the instance variable @dot_id using the class variable @@dot_id_counter. The method SyntaxNode#write_dot does the actual work. Right now it doesn't ignore any nodes, but one can imagine ignoring nodes only consisting of whitespace, etc.
- Loading branch information