summaryrefslogtreecommitdiff
path: root/src/sys/include/np
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-01 02:25:49 -0400
committerIan Moffett <ian@osmora.org>2025-10-01 02:25:49 -0400
commite2503def53445f74d37fcbc5d67b956bd795092f (patch)
treedcee8336db27796afef480d78f6d60896152d022 /src/sys/include/np
parentde12f97c8d41898255c7d9eed2c24b3c567b5747 (diff)
np: lex: Handle digits in the stream
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/np')
-rw-r--r--src/sys/include/np/lex.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sys/include/np/lex.h b/src/sys/include/np/lex.h
index daca954..235e997 100644
--- a/src/sys/include/np/lex.h
+++ b/src/sys/include/np/lex.h
@@ -63,19 +63,26 @@ typedef enum {
/* Types */
TT_U8, /* 'u8' */
+ /* Values */
+ TT_NUMBER, /* <numbers> */
+
/* Keywords */
TT_BEGIN, /* 'begin' */
TT_PROC, /* 'proc' */
TT_END, /* 'end' */
} tt_t;
+typedef uint64_t tokval_t;
+
/*
* Represents a lexer token
*
* @token: Token type
+ * @val: Integer value
*/
struct lex_token {
tt_t token;
+ tokval_t val;
};
/*