Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Keywords = map[string]TokenType{ "let": Let, "func": Func, "if": If, "else": Else, "and": And, "or": Or, "true": True, "false": False, "while": While, "int": IntType, "double": DoubleType, "str": StringType, "void": VoidType, "return": Return, "struct": Struct, }
View Source
var ValueTypes = []TokenType{ IntType, DoubleType, StringType, VoidType, }
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct {
interfaces.SourceLocation
Type TokenType
Lexeme string
Literal string
}
type TokenType ¶
type TokenType int
const ( Undefined TokenType = iota Identifier Int Double String Plus Minus Star Slash Percent Less LessEqual Greater GreaterEqual Equal EqualEqual Bang BangEqual ParenOpen ParenClose BraceOpen BraceClose Dot Comma Semicolon Colon BracketOpen BracketClose Eof True False Let Func And Or If Else While Return IntType DoubleType StringType VoidType Struct )
Click to show internal directories.
Click to hide internal directories.