Documentation ¶
Index ¶
- Variables
- func EncodeRuneToString(r rune) string
- func IsChar(ch rune) func(rune) bool
- func IsDQMeta(r rune) bool
- func IsHexDigit(r rune) bool
- func IsMeta(r rune) bool
- func IsNewline(r rune) bool
- func IsOctDigit(r rune) bool
- func IsSpace(r rune) bool
- func Not(pred func(rune) bool) func(rune) bool
- func Parse(r io.Reader) ([][]string, error)
- type LexError
- type Lexer
- func (l *Lexer) Go() <-chan Token
- func (l *Lexer) Lex(ch chan<- Token)
- func (l *Lexer) LexDoubleQuotedString() (string, error)
- func (l *Lexer) LexHexEscape(n int) (rune, error)
- func (l *Lexer) LexOctalEscape() (rune, error)
- func (l *Lexer) Until(pred func(rune) bool) string
- func (l *Lexer) While(pred func(rune) bool) string
- type Token
- type TokenType
Constants ¶
This section is empty.
Variables ¶
View Source
var Escapes = map[rune]string{
'a': "\a",
'b': "\b",
't': "\t",
'n': "\n",
'v': "\v",
'f': "\f",
'r': "\r",
'e': "\x1B",
}
Functions ¶
func EncodeRuneToString ¶
func IsHexDigit ¶
func IsOctDigit ¶
Types ¶
type Lexer ¶
type Lexer struct {
In []byte
}
func (*Lexer) LexDoubleQuotedString ¶
func (*Lexer) LexOctalEscape ¶
Click to show internal directories.
Click to hide internal directories.