rust

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT, MIT Imports: 2 Imported by: 0

Documentation

Overview

Package rust is @lezer/rust's Rust grammar for internal/lezer: its parse tables and styleTags rules, generated from the npm package, and the ports of its external tokenizers (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/rust@1.0.3 in place of @lezer/java.

Index

Constants

This section is empty.

Variables

View Source
var Parser = sync.OnceValue(func() *lezer.Parser {
	p, err := lezer.New(spec, lezer.Externals{
		Tokenizers: map[string]lezer.Tokenizer{
			"closureParam":  closureParam,
			"tpDelim":       tpDelim,
			"literalTokens": literalTokens,
			"logicAnd":      logicAnd,
		},
	})
	if err != nil {
		panic("rust: generated spec does not load: " + err.Error())
	}
	return p
})

Parser is the Rust parser, built the first time it is asked for.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL