parser

package
v0.0.0-...-e73a948 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: GPL-3.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 CmdLine

type CmdLine struct {
	Line []byte
}

func (CmdLine) Error

func (CmdLine) Error() string

type LineReader

type LineReader interface {
	ReadLine() ([]byte, error)
}

type Parser

type Parser struct {

	// unstable
	CommentEOFHack bool
	// contains filtered or unexported fields
}

func (*Parser) AddLine

func (p *Parser) AddLine(line []byte)

func (*Parser) Append

func (p *Parser) Append(ext []byte)

func (*Parser) Errs

func (p *Parser) Errs() (err error)

func (*Parser) Init

func (p *Parser) Init(src []byte) *Parser

func (*Parser) IsUnexpectEOF

func (p *Parser) IsUnexpectEOF() bool

func (*Parser) Parse

func (p *Parser) Parse() (nodes []ast.Node, err error)

func (*Parser) ParseExpr

func (p *Parser) ParseExpr() (expr ast.Expr)

func (*Parser) ParseStmt

func (p *Parser) ParseStmt() (stmt ast.Stmt)

func (*Parser) ParseType

func (p *Parser) ParseType() ast.Expr

func (*Parser) Reset

func (p *Parser) Reset()

func (*Parser) Scan

func (p *Parser) Scan() (pos token.Pos, tok token.Token, lit string)

func (*Parser) SetSource

func (p *Parser) SetSource(src []byte)

func (*Parser) Source

func (p *Parser) Source() []byte

type Scanner

type Scanner struct {

	// unstable
	CommentEOFHack bool
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(r LineReader) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan() (nodes []ast.Node, err error)

Jump to

Keyboard shortcuts

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