Versions in this module Expand all Collapse all v1 v1.0.0 Oct 16, 2017 Changes in this version + const BOMError + const BOMIgnoreFirst + const BOMPassAll + const BOMPassFirst + const NonASCII + const RuneEOF + func DefaultRuneClass(r rune) int + type Char struct + Rune rune + func NewChar(pos token.Pos, r rune) Char + func (c Char) IsValid() bool + func (c Char) Pos() token.Pos + type CharReader interface + ReadChar func() (c Char, size int, err error) + type Lexer struct + File *token.File + First Char + Last Char + Prev Char + func New(file *token.File, src io.RuneReader, opts ...Option) (*Lexer, error) + func (l *Lexer) Abort() (int, bool) + func (l *Lexer) Enter() int + func (l *Lexer) Error(msg string) + func (l *Lexer) Lookahead() Char + func (l *Lexer) Mark() + func (l *Lexer) Next() int + func (l *Lexer) Offset() int + func (l *Lexer) Rule0() int + func (l *Lexer) Token() []Char + func (l *Lexer) TokenBytes(builder func(*bytes.Buffer)) []byte + func (l *Lexer) Unget(c ...Char) + type Option func(*Lexer) error + func BOMMode(mode int) Option + func ErrorFunc(f func(token.Pos, string)) Option + func RuneClass(f func(rune) int) Option