Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer breaks an input stream into a group of lexical elements.
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token is a token, doh!
type TokenType ¶
type TokenType int
TokenType defines the type of identifier recognized by the Lexer.
const ( // Error is what you get when the lexer fails to grok the input. Error TokenType = iota // Identifier is a symbol confining to C-style variable naming rules. Identifier // Pattern is a regex-ish pattern, accepts the following special chars: [{.*}]. Pattern // Number is a numeral, including floats. Number // String is set of characters wrapped by double quotes. String // LParenthesis is the left parenthesis "(". LParenthesis // RParenthesis is the right parenthesis ")". RParenthesis // NotOperator is the exclamation sign - "!" symbol. NotOperator // Comma is a punctuation mark. Comma // Equal is the "=" symbol. Equal // True is Boolean true. True // False is Boolean false. False )
Click to show internal directories.
Click to hide internal directories.