Documentation ¶
Index ¶
Constants ¶
View Source
const LowestPrec = 0
LowestPrec represents lowest operator precedence.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token int
Token represents a token.
const ( Illegal Token = iota EOF Comment Ident Int Float Char String Add // + Sub // - Mul // * Quo // / Rem // % And // & Or // | Xor // ^ Shl // << Shr // >> AndNot // &^ AddAssign // += SubAssign // -= MulAssign // *= QuoAssign // /= RemAssign // %= AndAssign // &= OrAssign // |= XorAssign // ^= ShlAssign // <<= ShrAssign // >>= AndNotAssign // &^= LAnd // && LOr // || Inc // ++ Dec // -- Equal // == Less // < Greater // > Assign // = Not // ! NotEqual // != LessEq // <= GreaterEq // >= Define // := Ellipsis // ... LParen // ( LBrack // [ LBrace // { Comma // , Period // . RParen // ) RBrack // ] RBrace // } Semicolon // ; Colon // : Question // ? Break Continue Else For Func Error Immutable If Return Export True False In Undefined Import )
List of tokens
func (Token) IsOperator ¶
IsOperator returns true if the token is an operator.
func (Token) Precedence ¶
Precedence returns the precedence for the operator token.
Click to show internal directories.
Click to hide internal directories.