Documentation ¶
Index ¶
Constants ¶
View Source
const EOF rune = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenLimitReachedError ¶ added in v0.24.0
func (TokenLimitReachedError) Error ¶ added in v0.24.0
func (t TokenLimitReachedError) Error() string
type TokenStream ¶ added in v0.20.0
type TokenStream interface { // Next consumes and returns one Token. If there are no tokens remaining, it returns Token{TokenEOF} Next() Token Cursor() int Revert(cursor int) // Input returns the whole input as source code Input() string Reclaim() }
func Lex ¶
func Lex(input string, memoryGauge common.MemoryGauge) TokenStream
type TokenType ¶
type TokenType uint8
const ( TokenError TokenType = iota TokenEOF TokenSpace TokenBinaryIntegerLiteral TokenOctalIntegerLiteral TokenDecimalIntegerLiteral TokenHexadecimalIntegerLiteral TokenUnknownBaseIntegerLiteral TokenFixedPointNumberLiteral TokenIdentifier TokenString TokenPlus TokenMinus TokenStar TokenSlash TokenPercent TokenDoubleQuestionMark TokenParenOpen TokenParenClose TokenBraceOpen TokenBraceClose TokenBracketOpen TokenBracketClose TokenQuestionMark TokenQuestionMarkDot TokenComma TokenColon TokenDot TokenSemicolon TokenLeftArrow TokenLeftArrowExclamation TokenSwap TokenLess TokenLessEqual TokenLessLess TokenGreater TokenGreaterEqual TokenEqual TokenEqualEqual TokenExclamationMark TokenNotEqual TokenBlockCommentStart TokenBlockCommentEnd TokenBlockCommentContent TokenLineComment TokenAmpersand TokenAmpersandAmpersand TokenCaret TokenVerticalBar TokenVerticalBarVerticalBar TokenAt TokenAsExclamationMark TokenAsQuestionMark TokenPragma // NOTE: not an actual token, must be last item TokenMax )
func (TokenType) IsIntegerLiteral ¶ added in v0.24.0
Click to show internal directories.
Click to hide internal directories.