extractor

package module
v0.0.0-...-6f676a3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

README

extractor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(word string) func(*Lexer) bool

func ASkip

func ASkip(word string) func(*Lexer) bool

func Ex

func Ex(result *string) func(*Lexer) bool

func ExId

func ExId(result *string) func(*Lexer) bool

func ExLine

func ExLine(result *string) func(*Lexer) bool

func Skip

func Skip(l *Lexer) bool

Types

type ExtractError

type ExtractError struct {
	Msg string
	Pos Position
}

func (*ExtractError) Error

func (e *ExtractError) Error() string

type Lexer

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

func InitLexer

func InitLexer(text string) *Lexer

func (*Lexer) GetText

func (l *Lexer) GetText() string

func (*Lexer) GetTok

func (l *Lexer) GetTok() rune

func (*Lexer) IsIdent

func (l *Lexer) IsIdent() bool

func (*Lexer) LineStr

func (l *Lexer) LineStr() string

func (*Lexer) Next

func (l *Lexer) Next() bool

func (*Lexer) Pos

func (l *Lexer) Pos() Position

type Op

type Op func(*Lexer) bool

func And

func And(ops ...Op) Op

func ExIs

func ExIs(result *bool, op Op) Op

func Many

func Many(op Op) Op

func Must

func Must(word string) Op

func Option

func Option(op Op) Op

func Or

func Or(ops ...Op) Op

func ThrowError

func ThrowError(msg string) Op

type Position

type Position struct {
	Offset int
	Line   int
	Column int
}

Jump to

Keyboard shortcuts

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