aboutsummaryrefslogtreecommitdiff
path: root/include/cps/Lexer.h
diff options
context:
space:
mode:
author_ov4 <hausemasterstream@gmail.com>2026-02-02 08:45:01 +0000
committer_ov4 <hausemasterstream@gmail.com>2026-02-02 08:45:01 +0000
commit419420770c4545ea4010047ef2153004d4700eed (patch)
treebd19eed681dbb68ecb501b6cfc220c42a9803ef3 /include/cps/Lexer.h
parentecc0fc463ba54dd0cbe33bc14415f432eaa959de (diff)
Added REAL and BOOLEAN types, DIV and MOD operators
Diffstat (limited to 'include/cps/Lexer.h')
-rw-r--r--include/cps/Lexer.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/cps/Lexer.h b/include/cps/Lexer.h
index 4226cc3..15f56c4 100644
--- a/include/cps/Lexer.h
+++ b/include/cps/Lexer.h
@@ -32,15 +32,24 @@ enum Token {
tok_array = -19,
tok_of = -20,
+ tok_real_kw = -21,
+ tok_boolean_kw = -22,
+ tok_true = -23,
+ tok_false = -24,
+
tok_identifier = -100,
- tok_number = -101,
+ tok_number_int = -101,
+ tok_number_real = -102,
tok_assign = -200, // <-
tok_eq = -201, // =
tok_ne = -202, // <>
tok_le = -203, // <=
tok_ge = -204, // >=
-
+
+ tok_div = -205,
+ tok_mod = -206,
+
tok_colon = -300, // :
tok_function = -400,
@@ -59,6 +68,7 @@ class Lexer {
public:
std::string IdentifierStr;
int64_t NumVal;
+ double RealVal;
int gettok();
int getLine() const { return CurrentLine; }