parser

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseError

type ParseError struct {
	Pos     ast.Position `json:"pos"`
	Message string       `json:"message"`
}

ParseError records a parser error with source position.

func Parse

func Parse(source string) (*ast.FnAST, []ParseError)

Parse tokenizes source and parses a function definition.

func ParseExpression

func ParseExpression(source string) (ast.ExprNode, []ParseError)

ParseExpression parses a standalone expression (for inline execute).

func (*ParseError) Error

func (e *ParseError) Error() string

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser converts a token stream into an AST.

Jump to

Keyboard shortcuts

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