Documentation
¶
Overview ¶
Package token provides the base lexical tokens for parsing files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token int
Token is the token representation for the GryphOn uration files
const ( // Special tokens ILLEGAL Token = iota EOF // EOF COMMENT // # IDENT // Slave1 INT // 200 FLOAT // 123.45 // Operators and delimiters ADD // + SUB // - MUL // * QUO // / REM // % AND // & OR // | DAND // && DOR // || ASSIGN // = NOT // ! EQL // == LSS // < GTR // > NEQ // != LEQ // <= GEQ // >= LPAREN // ( LBRACK // [ LBRACE // { COMMA // , PERIOD // . ELLIPSIS // ... RPAREN // ) RBRACK // ] RBRACE // } SEMICOLON // ; COLON // : ITERATOR // $ OUTPUT // Output registers INPUT // Input registers )
func (Token) IsComparisonOperator ¶
IsComparisonOperator returns true for tokens corresponding to comparison operators; it returns false otherwise.
func (Token) IsKeyword ¶
IsKeyword returns true for tokens corresponding to keywords; it returns false otherwise.
func (Token) IsLiteral ¶
IsLiteral returns true for tokens corresponding to identifiers and basic type literals; it returns false otherwise.
func (Token) IsOperator ¶
IsOperator returns true for tokens corresponding to operators and delimiters; it returns false otherwise.
func (Token) Precedence ¶
Precedence indicates the priority of the defined operators
Click to show internal directories.
Click to hide internal directories.