gopher-lua: github.com/yuin/gopher-lua/parse Index | Files

package parse

import "github.com/yuin/gopher-lua/parse"

Index

Package Files

lexer.go parser.go

Constants

const EOF = -1
const T2Comma = 57371
const T3Comma = 57372
const TAnd = 57346
const TBreak = 57347
const TDo = 57348
const TElse = 57349
const TElseIf = 57350
const TEnd = 57351
const TEqeq = 57367
const TFalse = 57352
const TFor = 57353
const TFunction = 57354
const TGte = 57370
const TIdent = 57373
const TIf = 57355
const TIn = 57356
const TLocal = 57357
const TLte = 57369
const TNeq = 57368
const TNil = 57358
const TNot = 57359
const TNumber = 57374
const TOr = 57360
const TRepeat = 57362
const TReturn = 57361
const TString = 57375
const TThen = 57363
const TTrue = 57364
const TUntil = 57365
const TWhile = 57366
const UNARY = 57376

func Dump Uses

func Dump(chunk []ast.Stmt) string

func Parse Uses

func Parse(reader io.Reader, name string) (chunk []ast.Stmt, err error)

func TokenName Uses

func TokenName(c int) string

type Error Uses

type Error struct {
    Pos     ast.Position
    Message string
    Token   string
}

func (*Error) Error Uses

func (e *Error) Error() string

type Lexer Uses

type Lexer struct {
    Stmts         []ast.Stmt
    PNewLine      bool
    Token         ast.Token
    PrevTokenType int
    // contains filtered or unexported fields
}

func (*Lexer) Error Uses

func (lx *Lexer) Error(message string)

func (*Lexer) Lex Uses

func (lx *Lexer) Lex(lval *yySymType) int

func (*Lexer) TokenError Uses

func (lx *Lexer) TokenError(tok ast.Token, message string)

type Scanner Uses

type Scanner struct {
    Pos ast.Position
    // contains filtered or unexported fields
}

func NewScanner Uses

func NewScanner(reader io.Reader, source string) *Scanner

func (*Scanner) Error Uses

func (sc *Scanner) Error(tok string, msg string) *Error

func (*Scanner) Newline Uses

func (sc *Scanner) Newline(ch int)

func (*Scanner) Next Uses

func (sc *Scanner) Next() int

func (*Scanner) Peek Uses

func (sc *Scanner) Peek() int

func (*Scanner) Scan Uses

func (sc *Scanner) Scan(lexer *Lexer) (ast.Token, error)

func (*Scanner) TokenError Uses

func (sc *Scanner) TokenError(tok ast.Token, msg string) *Error

Package parse imports 8 packages (graph) and is imported by 27 packages. Updated 2019-01-29. Refresh now. Tools for package owners.