summaryrefslogtreecommitdiff
path: root/boot/definitions.inc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-05-03 23:35:41 +0200
committerEugen Wissner <belka@caraus.de>2025-05-03 23:35:41 +0200
commit0a0bc4e1f2e263cdda83bd78a2a77ff68ae2334e (patch)
tree23e6b113d741761a2e897e4138a96c7f7701d348 /boot/definitions.inc
parentdcfd6b1515679cfbc75de12a17352d9d1eddceaf (diff)
downloadelna-0a0bc4e1f2e263cdda83bd78a2a77ff68ae2334e.tar.gz
Tokenize single character symbols
Diffstat (limited to 'boot/definitions.inc')
-rw-r--r--boot/definitions.inc24
1 files changed, 24 insertions, 0 deletions
diff --git a/boot/definitions.inc b/boot/definitions.inc
index 0e2f54e..4d8ab9c 100644
--- a/boot/definitions.inc
+++ b/boot/definitions.inc
@@ -1,3 +1,7 @@
+# This Source Code Form is subject to the terms of the Mozilla Public License,
+# v. 2.0. If a copy of the MPL was not distributed with this file, You can
+# obtain one at https://mozilla.org/MPL/2.0/.
+
# The constant should match the index in the keywords array in tokenizer.s.
.equ TOKEN_PROGRAM, 1
@@ -26,3 +30,23 @@
.equ TOKEN_DEFER, 24
.equ TOKEN_CASE, 25
.equ TOKEN_OF, 26
+
+# The constant should match the character index in the byte_keywords string.
+
+.equ TOKEN_AND, 27
+.equ TOKEN_DOT, 28
+.equ TOKEN_COMMA, 29
+.equ TOKEN_COLON, 30
+.equ TOKEN_SEMICOLON, 31
+.equ TOKEN_LEFT_PAREN, 32
+.equ TOKEN_RIGHT_PAREN, 33
+.equ TOKEN_LEFT_BRACKET, 34
+.equ TOKEN_RIGHT_BRACKET, 35
+.equ TOKEN_HAT, 36
+.equ TOKEN_EQUALS, 37
+.equ TOKEN_PLUS, 38
+.equ TOKEN_MINUS, 39
+.equ TOKEN_ASTERISK, 40
+.equ TOKEN_AT, 41
+
+.equ TOKEN_ASSIGN, 42