From 0a0bc4e1f2e263cdda83bd78a2a77ff68ae2334e Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 3 May 2025 23:35:41 +0200 Subject: Tokenize single character symbols --- boot/definitions.inc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'boot/definitions.inc') 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 -- cgit v1.2.3