Documentation
¶
Overview ¶
Package javascript is @lezer/javascript's JavaScript grammar for internal/lezer: its parse tables and styleTags rules, generated from the npm package, and ports of its external tokenizers and context tracker. go generate rewrites the tables and the golden files the tests compare against, with LEZER_NODE_MODULES naming a node_modules directory set up as internal/lezer/gen/gen.mjs says (with @lezer/javascript in place of @lezer/java).
The grammar has two dialects, jsx and ts. Each parser here enables them the way @codemirror/lang-javascript's language of the same name does.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var JSX = sync.OnceValue(func() *lezer.Parser { return withDialect("jsx") })
JSX is the parser for JavaScript with JSX.
var Parser = sync.OnceValue(func() *lezer.Parser { return withDialect("") })
Parser is the plain JavaScript parser, built the first time it is asked for.
var TSX = sync.OnceValue(func() *lezer.Parser { return withDialect("jsx ts") })
TSX is the parser for TypeScript with JSX.
var TypeScript = sync.OnceValue(func() *lezer.Parser { return withDialect("ts") })
TypeScript is the parser for TypeScript.
Functions ¶
This section is empty.
Types ¶
This section is empty.