package token
// Kind represents the type of token.
type Kind uint8
const (
Invalid Kind = iota // Invalid is an invalid token.
EOF // EOF is the end of file.
NewLine // NewLine is the newline character.
Identifier // Identifier is a series of characters used to identify a variable or function.
Number // Number is a series of numerical characters.
Rune // Rune is a single unicode code point.
String // String is an uninterpreted series of characters in the source code.
Comment // Comment is a comment.
GroupStart // (
GroupEnd // )
BlockStart // {
BlockEnd // }
ArrayStart // [
ArrayEnd // ]
ReturnType // ->
___OPERATORS___ //
Add // +
Sub // -
Mul // *
Div // /
Mod // %
And // &
Or // |
Xor // ^
Shl // <<
Shr // >>
LogicalAnd // &&
LogicalOr // ||
Define // :=
Period // .
Call // x()
Array // [x]
Separator // ,
___ASSIGNMENTS___ //
Assign // =
AddAssign // +=
SubAssign // -=
MulAssign // *=
DivAssign // /=
ModAssign // %=
AndAssign // &=
OrAssign // |=
XorAssign // ^=
ShlAssign // <<=
ShrAssign // >>=
___END_ASSIGNMENTS___ //
___COMPARISONS___ //
Equal // ==
NotEqual // !=
Less // <
Greater // >
LessEqual // <=
GreaterEqual // >=
___END_COMPARISONS___ //
___UNARY___ //
Not // ! (unary)
Negate // - (unary)
___END_UNARY___ //
___END_OPERATORS___ //
___KEYWORDS___ //
Assert // assert
Else // else
If // if
Import // import
Loop // loop
Return // return
Switch // switch
___END_KEYWORDS___ //
)