Documentation
¶
Overview ¶
token package is used to define the token types and the Token struct.
The TokenType type is a string that represents the type of a token. The Token struct has two fields: Type and Literal.
1. Type is the type of the token, and
2. Literal is the actual value of the token.
csvlang has some reserved keywords and the keywords map is used to store them.
Index ¶
Constants ¶
View Source
const ( ILLEGAL = "ILLEGAL" // unknown token EOF = "EOF" // end of file // Identifiers + literals IDENT = "IDENT" // add, foobar, x, y, ... INT = "INT" // 1343456 STRING = "STRING" // "foobar" // Operators ASSIGN = "=" PLUS = "+" MINUS = "-" BANG = "!" ASTERISK = "*" SLASH = "/" LT = "<" GT = ">" EQ = "==" NOT_EQ = "!=" // Delimiters COMMA = "," // acts as a delimiter in arrays SEMICOLON = ";" NEWLINE = "\\n" // Add this line LPAREN = "(" RPAREN = ")" LBRACE = "{" RBRACE = "}" LBRACKET = "[" RBRACKET = "]" // Comment SINGLE_LINE_COMMENT = "#" // Keywords LOAD = "LOAD" // load csv file READ = "READ" // read data from the loaded csv file UPDATE = "UPDATE" DELETE = "DELETE" FUNCTION = "FUNCTION" LET = "LET" TRUE = "TRUE" FALSE = "FALSE" IF = "IF" FOR = "FOR" IN = "IN" ELSE = "ELSE" RETURN = "RETURN" SAVE = "SAVE" AS = "AS" // used in "save rows as filtered.csv" statements ROW = "ROW" // read particular rows from the loaded csv file COL = "COL" // read particular columns from the loaded csv rows WHERE = "WHERE" // filter rows based on a condition )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.