Skip to content

Commit cd82fde

Browse files
First version
0 parents  commit cd82fde

28 files changed

+5869
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules
2+
/dist
3+
/tests/dist

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# lezer-tree-visualizer
2+
3+
[![CodeMirror 6](https://img.shields.io/badge/CodeMirror-6-informational?logo=CodeMirror)](https://codemirror.net/6/)
4+
[![Documentation](https://img.shields.io/badge/-Documentation-informational?logo=typescript&logoColor=white)](https://colintimbarndt.github.io/lezer-tree-visualizer/docs/)
5+
6+
A basic tool for debugging syntax trees by visualizing them. This module
7+
exports two functions, one for directly printing to the console and another
8+
one for storing the formatted string (without color formatting).
9+
10+
This modules supports both native consoles and the web. Be sure to use CommonJS
11+
for the native version and the ES-module for web color support.
12+
13+
## Example
14+
15+
This is a simple Java program which can be parsed with `lezer-java`:
16+
17+
```java
18+
package tests;
19+
20+
import java.lang.String;
21+
22+
/**
23+
* Test
24+
*/
25+
public class Test {
26+
public static void main(String[] args) {
27+
System.out.println("Hello world!");
28+
}
29+
}
30+
```
31+
32+
When printing the syntax tree to the console:
33+
34+
![Java Tree](./img/java-tree.png)

0 commit comments

Comments
 (0)