grammarpatch

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package grammarpatch declares pinned upstream grammar overlays.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Regenerate added in v0.57.0

func Regenerate(repoDir, subdir string, spec Spec) error

Regenerate rebuilds parser.c after an overlay using its pinned generator. Grammars with an npm lockfile retain their own installer; Make uses the CLI version already pinned by the parity Docker image because it has no lockfile.

Types

type Spec

type Spec struct {
	File             string
	RegenerateParser bool
	// GeneratorVersion uses the harness-provided CLI instead of a grammar-owned npm lockfile.
	GeneratorVersion string
}

Spec describes one checked-in grammar source overlay.

func Lookup

func Lookup(name string) (Spec, bool)

Lookup returns the overlay specification for a grammar.

func (Spec) RegenerateForHarness added in v0.57.0

func (s Spec) RegenerateForHarness(repoDir, subdir string) error

RegenerateForHarness keeps mixed-revision oracle harnesses compatible.

Jump to

Keyboard shortcuts

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