{"modulePath":"github.com/lichdotdev/godemirror","version":"v0.13.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package python\n\nPackage python is @lezer/python's Python grammar for internal/lezer: its parse tables and styleTags rules, generated from the npm package, and the ports of its external tokenizers and indentation tracker (tokens.go). 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/python@1.1.19 in place of @lezer/java.\n\n## Variables\n\n```go\nvar Parser = sync.OnceValue(func() *lezer.Parser {\n\tp, err := lezer.New(spec, lezer.Externals{\n\t\tTokenizers: map[string]lezer.Tokenizer{\n\t\t\t\"legacyPrint\": legacyPrint,\n\t\t\t\"indentation\": indentation,\n\t\t\t\"newlines\":    newlines,\n\t\t\t\"strings\":     stringTokens,\n\t\t},\n\t\tContext: \u0026trackIndent,\n\t})\n\tif err != nil {\n\t\tpanic(\"python: generated spec does not load: \" + err.Error())\n\t}\n\treturn p\n})\n```\nParser is the Python parser, built the first time it is asked for.\n\n","path":"github.com/lichdotdev/godemirror/internal/lezer/python","name":"python","synopsis":"Package python is @lezer/python's Python grammar for internal/lezer: its parse tables and styleTags rules, generated from the npm package, and the ports of its external tokenizers and indentation tracker (tokens.go).","isRedistributable":true}
