Documentation ¶
Overview ¶
Package token contains constants which are used when lexing a program written in the monkey language, as done by the parser.
Index ¶
Constants ¶
View Source
const ( AND = "&&" ASSIGN = "=" ASTERISK = "*" ASTERISK_EQUALS = "*=" BACKTICK = "`" FSTRING = "'" BANG = "!" CASE = "case" COLON = ":" COMMA = "," CONST = "CONST" DECLARE = ":=" DEFAULT = "DEFAULT" FUNC = "FUNC" ELSE = "ELSE" EOF = "EOF" EQ = "==" FALSE = "FALSE" FLOAT = "FLOAT" FOR = "FOR" GT = ">" GT_EQUALS = ">=" IDENT = "IDENT" IF = "IF" ILLEGAL = "ILLEGAL" INT = "INT" LBRACE = "{" LBRACKET = "[" LPAREN = "(" LT = "<" LT_EQUALS = "<=" MINUS = "-" MINUS_EQUALS = "-=" MINUS_MINUS = "--" MOD = "%" NOT_EQ = "!=" NIL = "nil" PIPE = "|" OR = "||" PERIOD = "." PLUS = "+" PLUS_EQUALS = "+=" PLUS_PLUS = "++" POW = "**" QUESTION = "?" RBRACE = "}" RBRACKET = "]" RETURN = "RETURN" RPAREN = ")" SEMICOLON = ";" SLASH = "/" SLASH_EQUALS = "/=" STRING = "STRING" SWITCH = "switch" TRUE = "TRUE" NEWLINE = "EOL" IMPORT = "IMPORT" BREAK = "BREAK" CONTINUE = "CONTINUE" VAR = "VAR" IN = "IN" RANGE = "RANGE" )
pre-defined Type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Position ¶
Position points to a particular location in an input string. It helps track offset since the beginning of the input as well as line offsets.
func (Position) ColumnNumber ¶
func (Position) LineNumber ¶
Click to show internal directories.
Click to hide internal directories.