0.2.1 • Published 3 years ago

@colin_t/lezer-tree-visualizer v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

lezer-tree-visualizer

CodeMirror 6 Documentation npm (scoped)

A basic tool for debugging syntax trees by visualizing them. This module exports two functions, one for directly printing to the console and another one for storing the formatted string (without color formatting).

This modules supports both native consoles and the web. This library detects if it is run in the browser or Node.

Example

This is a simple Java program which can be parsed with lezer-java:

package tests;

import java.lang.String;

/**
 * Test
 */
public class Test {
  public static void main(String[] args) {
    System.out.println("Hello world!");
  }
}

When printing the syntax tree to the console:

Java Tree