diff options
author | pommicket <pommicket@gmail.com> | 2022-02-04 19:31:45 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-04 19:31:45 -0500 |
commit | dfce9118b9cbfae1fb287f5e4488b971407522cd (patch) | |
tree | a0497c7c78b68ee90797a070c48b1f46b6f76473 /05/constants.b | |
parent | d1167f03d03c2a6ab75fce410706e3098dfd3090 (diff) |
parsing break, continue, return
Diffstat (limited to '05/constants.b')
-rw-r--r-- | 05/constants.b | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/05/constants.b b/05/constants.b index 6a0bba1..68481a1 100644 --- a/05/constants.b +++ b/05/constants.b @@ -30,6 +30,14 @@ ; highest ; NB: for equal precedence, operators are applied left-to-right except for assignment operators (precedence 2) + +; TOKENS +; tokens are 16 bytes and have the following format: +; uchar type +; uchar info +; ushort file +; uint line +; ulong data -- for int/float literals, the value; for string literals, the runtime address; for identifiers, the name of the identifier #define SYMBOL_COMMA 200 ; NOTE: operator_right_associative and others require SYMBOL_EQ to be the first assignment operator #define SYMBOL_EQ 201 @@ -79,6 +87,7 @@ #define SYMBOL_SEMICOLON 244 #define SYMBOL_DOT 245 + #define TOKEN_IDENTIFIER 1 #define TOKEN_CONSTANT_FLOAT 2 #define TOKEN_CONSTANT_INT 3 @@ -738,6 +747,10 @@ :str_union string union byte 0 -:str_typedef ; currently only used for nice debug output +; NB: some of these are only used for nice debug output +:str_typedef string typedef byte 0 +:str_return + string return + byte 0 |