Documentation ¶
Overview ¶
Package token defines constants representing the lexical tokens.
Index ¶
Constants ¶
View Source
const ( LowestPrec = 0 // non-operators HighestPrec = 3 )
A set of constants for precedence-based expression parsing. Non-operators have lowest precedence.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token int
func (Token) Precedence ¶
Precedence returns the operator precedence of the binary operator op. If op is not a binary operator, the result is LowestPrecedence.
Click to show internal directories.
Click to hide internal directories.