{"modulePath":"github.com/lichdotdev/godemirror","version":"v0.13.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package javascript\n\nPackage 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).\n\nThe grammar has two dialects, jsx and ts. Each parser here enables them the way @codemirror/lang-javascript's language of the same name does.\n\n## Variables\n\n```go\nvar JSX = sync.OnceValue(func() *lezer.Parser { return withDialect(\"jsx\") })\n```\nJSX is the parser for JavaScript with JSX.\n\n```go\nvar Parser = sync.OnceValue(func() *lezer.Parser { return withDialect(\"\") })\n```\nParser is the plain JavaScript parser, built the first time it is asked for.\n\n```go\nvar TSX = sync.OnceValue(func() *lezer.Parser { return withDialect(\"jsx ts\") })\n```\nTSX is the parser for TypeScript with JSX.\n\n```go\nvar TypeScript = sync.OnceValue(func() *lezer.Parser { return withDialect(\"ts\") })\n```\nTypeScript is the parser for TypeScript.\n\n","path":"github.com/lichdotdev/godemirror/internal/lezer/javascript","name":"javascript","synopsis":"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.","isRedistributable":true}
