parse

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package parse turns .sel source into the high-level material model (hir). It generates the Selena tree-sitter language from grammar.SelenaGrammar via grammargen (the same engine as .gsx), parses the source, and walks the tree into a hir.Material. This is the front-end: with it, materials are authored as .sel files rather than hand-built HIR.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Material

func Material(src []byte) (hir.Material, error)

Material parses src and returns the first material it declares.

func Program

func Program(src []byte) (hir.Program, error)

Program parses src into all of its functions and materials.

Types

type Error

type Error struct {
	Message string
	Span    hir.Span
}

Error is a parser error that can be anchored back to source.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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