Header file for defining the token.
More...
#include <cstdint>
#include <sstream>
Go to the source code of this file.
|
| enum | TokenType : uint8_t {
TOK_BOOL
, TOK_CHAR
, TOK_SHORT
, TOK_INT
,
TOK_LONG
, TOK_FLOAT
, TOK_DOUBLE
, TOK_NOTH
,
TOK_LET
, TOK_FUN
, TOK_IF
, TOK_ELSE
,
TOK_FOR
, TOK_DO
, TOK_WHILE
, TOK_CONTINUE
,
TOK_BREAK
, TOK_MODULE
, TOK_PUB
, TOK_PRIV
,
TOK_USE
, TOK_CONST
, TOK_RETURN
, TOK_UNSAFE
,
TOK_EXTERN
, TOK_ID
, TOK_CHARACTER_LIT
, TOK_SHORT_LIT
,
TOK_INT_LIT
, TOK_LONG_LIT
, TOK_FLOAT_LIT
, TOK_DOUBLE_LIT
,
TOK_BOOLEAN_LIT
, TOK_STRING_LIT
, TOK_OP_PLUS
, TOK_OP_PLUS_EQ
,
TOK_OP_INC
, TOK_OP_MINUS
, TOK_OP_MINUS_EQ
, TOK_OP_DEC
,
TOK_OP_MULT
, TOK_OP_MULT_EQ
, TOK_OP_DIV
, TOK_OP_DIV_EQ
,
TOK_OP_MODULO
, TOK_OP_MODULO_EQ
, TOK_OP_EQ
, TOK_OP_EQ_EQ
,
TOK_OP_NOT_EQ_EQ
, TOK_OP_GT
, TOK_OP_GT_EQ
, TOK_OP_LS
,
TOK_OP_LS_EQ
, TOK_OP_L_NOT
, TOK_OP_L_AND
, TOK_OP_L_OR
,
TOK_OP_REF
, TOK_OP_COMMA
, TOK_OP_DOT
, TOK_OP_COLON
,
TOK_OP_SEMICOLON
, TOK_OP_LPAREN
, TOK_OP_RPAREN
, TOK_OP_LBRACE
,
TOK_OP_RBRACE
, TOK_OP_LBRACKET
, TOK_OP_RBRACKET
, TOK_OP_QUESTION
,
TOK_OP_NEXT
} |
| | All tokens types. More...
|
Header file for defining the token.
Definition in file token.hpp.
◆ TokenType
All tokens types.
| Enumerator |
|---|
| TOK_BOOL | 'bool' type keyword
|
| TOK_CHAR | 'char' type keyword
|
| TOK_SHORT | 'short' type keyword
|
| TOK_INT | 'int' type keyword
|
| TOK_LONG | 'long' type keyword
|
| TOK_FLOAT | 'float' type keyword
|
| TOK_DOUBLE | 'double' type keyword
|
| TOK_NOTH | 'noth' type keyword (only for functions)
|
| TOK_LET | 'let' keyword for variable definition
|
| TOK_FUN | 'fun' keyword for function definition
|
| TOK_IF | 'if' keyword for conditionally expression operator
|
| TOK_ELSE | 'else' keyword for else branch in conditionally expression operator
|
| TOK_FOR | 'for' keyword for for cycle definition
|
| TOK_DO | 'do' keyword for do-while cycle definition
|
| TOK_WHILE | 'while' keyword for while cycle definition
|
| TOK_CONTINUE | 'continue' keyword for jump to next cycle iteration
|
| TOK_BREAK | 'break' keyword for break cycle execution
|
| TOK_MODULE | 'module' keyword for module defintion
|
| TOK_PUB | 'pub' keyword for declare some statement with global visiblity
|
| TOK_PRIV | 'priv' keyword for declare some statement with local visiblity
|
| TOK_USE | 'use' keyword for import module
|
| TOK_CONST | 'const' keyword
|
| TOK_RETURN | 'return' keyword
|
| TOK_UNSAFE | 'unsafe' keyword
|
| TOK_EXTERN | 'extern' keyword
|
| TOK_ID | Identifier
|
| TOK_CHARACTER_LIT | Character literal
|
| TOK_SHORT_LIT | Integer (16 bits) literal
|
| TOK_INT_LIT | Integer (32 bits) literal
|
| TOK_LONG_LIT | Integer (64 bits) literal
|
| TOK_FLOAT_LIT | Floating point (32 bits) literal
|
| TOK_DOUBLE_LIT | Floating point (64 bits) literal
|
| TOK_BOOLEAN_LIT | Boolean literal
|
| TOK_STRING_LIT | String literal
|
| TOK_OP_PLUS | '+' operator
|
| TOK_OP_PLUS_EQ | '+=' operator
|
| TOK_OP_INC | '++' operator
|
| TOK_OP_MINUS | '-' operator
|
| TOK_OP_MINUS_EQ | '-=' operator
|
| TOK_OP_DEC | '–' operator
|
| TOK_OP_MULT | '*' operator
|
| TOK_OP_MULT_EQ | '*=' operator
|
| TOK_OP_DIV | '/' operator
|
| TOK_OP_DIV_EQ | '/=' operator
|
| TOK_OP_MODULO | '' operator
|
| TOK_OP_MODULO_EQ | '%=' operator
|
| TOK_OP_EQ | '=' operator
|
| TOK_OP_EQ_EQ | '==' operator
|
| TOK_OP_NOT_EQ_EQ | '!=' operator
|
| TOK_OP_GT | '>' operator
|
| TOK_OP_GT_EQ | '>=' operator
|
| TOK_OP_LS | '<' operator
|
| TOK_OP_LS_EQ | '<=' operator
|
| TOK_OP_L_NOT | '!' (logical negative) operator
|
| TOK_OP_L_AND | '&&' (logical and) operator
|
| TOK_OP_L_OR | '||' (logical or) operator
|
| TOK_OP_REF | '&' (reference) operator
|
| TOK_OP_COMMA | ',' operator
|
| TOK_OP_DOT | '.' operator
|
| TOK_OP_COLON | ':' operator
|
| TOK_OP_SEMICOLON | ';' operator
|
| TOK_OP_LPAREN | '(' operator
|
| TOK_OP_RPAREN | ')' operator
|
| TOK_OP_LBRACE | '{' operator
|
| TOK_OP_RBRACE | '}' operator
|
| TOK_OP_LBRACKET | '[' operator
|
| TOK_OP_RBRACKET | ']' operator
|
| TOK_OP_QUESTION | '?' operator
|
| TOK_OP_NEXT | '->' operator
|
Definition at line 14 of file token.hpp.