3
0
corteza/pkg/qlng/token_codes.go
Tomaž Jerman 25a9be1a54 Refactor pkg/ql for more flexibility
Created a temporary pkg/qlng package which contains the reworked
logic to avoid (potentially) breaking the rest of the system.

Most of the testing will be done implicitly via reporting tests.
2021-08-16 09:16:07 +02:00

30 lines
372 B
Go

package qlng
type (
tokenCode int
)
const (
CHAR_WHITELIST_WHITESPACE = " \n\t"
CHAR_WHITELIST_OPERATORS = "!+-/*=<>&|"
CHAR_WHITELIST_QUOTES = "'"
)
const (
// Special tokens
ILLEGAL tokenCode = iota
EOF
WS // 2
IDENT
LNULL
LBOOL // 4
LNUMBER
LSTRING
COMMA // ,
DOT // .
OPERATOR // + - / *
PARENTHESIS_OPEN
PARENTHESIS_CLOSE
KEYWORD
)