parser

package
v0.0.0-...-8728ada Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(reader io.Reader) (file *ast.File, err error)

Parse source code from io.Reader

Types

type Parser

type Parser struct {
	Error            func(tokenIndx int, pos ast.Position, endPos ast.Position, msg string)
	ContinueOnErrors bool
	// contains filtered or unexported fields
}

func NewParser

func NewParser(s scanner.ScannerInterface) *Parser

NewParser return new Parser for a given scanner

func (*Parser) Parse

func (p *Parser) Parse() (file *ast.File, err error)

Parse source code

type PosError

type PosError struct {
	ast.Position
	Message string
}

func (PosError) Error

func (p PosError) Error() string

Jump to

Keyboard shortcuts

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