Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LowestPrecedence is the lowest precedence LowestPrecedence = 0 // UnaryPrecedence is the precedence of unary operators UnaryPrecedence = 6 // HighestPrecedence is the highest precedence HighestPrecedence = 7 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token is a token
func (Token) IsOperator ¶
IsOperator returns true if token is a operator
func (Token) Precedence ¶
Precedence returns the operators precedence
type TokenType ¶
type TokenType int
TokenType is the type of a token
const ( // Special ILLEGAL TokenType = iota EOF COMMENT IDENT INT FLOAT CHAR STRING ADD SUB MUL QUO REM AND OR XOR SHL SHR AND_NOT ADD_ASSIGN SUB_ASSIGN MUL_ASSIGN QUO_ASSIGN REM_ASSIGN AND_ASSIGN OR_ASSIGN XOR_ASSIGN SHL_ASSIGN SHR_ASSIGN AND_NOT_ASSIGN LAND LOR ARROW INC DEC EQL LSS GTR ASSIGN NOT NEQ LEQ GEQ DEFINE ELLIPSIS LPAREN LBRACK LBRACE COMMA PERIOD RPAREN RBRACK RBRACE SEMICOLON COLON DOUBLE_COLON BREAK CASE CONST CONTINUE DEFAULT DEFER ELSE FALLTHROUGH FOR FUNC PROC IF IMPORT RETURN SELECT STRUCT SWITCH TYPE VAR )
TokenType constants
Click to show internal directories.
Click to hide internal directories.