Examples
A collection of examples that work through some different grammars.
-
Setup
Installing Lezer libraries and setting up a parser package.
-
Basics
Shows the structure of a simple Lezer grammar.
-
Syntax Highlighting
Adding highlighting information for a tree and using that to highlight code.
-
JavaScript
Implementation of a parser for a subset of JavaScript.
-
Indentation
Building a grammar for a small language that uses Python-like indentation syntax.
-
Testing
Testing a grammar using the test tool provided by @lezer/generator.