parser

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package parser is a recursive-descent parser turning TDL source into an ast.File. It reports every syntax error in one pass.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(filename string, r io.Reader) (*ast.File, error)

Parse parses one TDL source file. On failure it returns a nil file and an ErrorList.

Types

type Error

type Error struct {
	Pos lex.Position
	Msg string
}

Error is a single parse error at a source position.

func (*Error) Error

func (e *Error) Error() string

type ErrorList

type ErrorList []*Error

ErrorList is the non-empty list of errors Parse returns on failure.

func (ErrorList) Error

func (el ErrorList) Error() string

Jump to

Keyboard shortcuts

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