Documentation
¶
Overview ¶
Package token defines language keywords and tokens used when lexing source code.
Index ¶
Constants ¶
View Source
const ( AND = "&&" ASSIGN = "=" ASTERISK = "*" ASTERISK_EQUALS = "*=" BACKTICK = "`" FSTRING = "'" BANG = "!" CASE = "case" COLON = ":" COMMA = "," CONST = "CONST" DECLARE = ":=" DEFAULT = "DEFAULT" DEFER = "DEFER" FUNC = "FUNC" ELSE = "ELSE" EOF = "EOF" EQ = "==" FALSE = "FALSE" FLOAT = "FLOAT" FOR = "FOR" GT = ">" GT_GT = ">>" GT_EQUALS = ">=" GO = "GO" IDENT = "IDENT" IF = "IF" ILLEGAL = "ILLEGAL" INT = "INT" LBRACE = "{" LBRACKET = "[" LPAREN = "(" LT = "<" LT_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 = ";" SEND = "<-" SLASH = "/" SLASH_EQUALS = "/=" STRING = "STRING" STRUCT = "STRUCT" SWITCH = "switch" TRUE = "TRUE" NEWLINE = "EOL" IMPORT = "IMPORT" BREAK = "BREAK" CONTINUE = "CONTINUE" VAR = "VAR" IN = "IN" RANGE = "RANGE" FROM = "FROM" AS = "AS" )
Token types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Position ¶
Position points to a particular location in an input string.
func (Position) ColumnNumber ¶
ColumnNumber returns the 1-indexed column number for this position in the input.
func (Position) LineNumber ¶
LineNumber returns the 1-indexed line number for this position in the input.
Click to show internal directories.
Click to hide internal directories.