diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-01 02:25:49 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-01 02:25:49 -0400 |
commit | e2503def53445f74d37fcbc5d67b956bd795092f (patch) | |
tree | dcee8336db27796afef480d78f6d60896152d022 /src/sys/include | |
parent | de12f97c8d41898255c7d9eed2c24b3c567b5747 (diff) |
np: lex: Handle digits in the stream
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include')
-rw-r--r-- | src/sys/include/np/lex.h | 7 |
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; }; /* |