From e2503def53445f74d37fcbc5d67b956bd795092f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 1 Oct 2025 02:25:49 -0400 Subject: np: lex: Handle digits in the stream Signed-off-by: Ian Moffett --- src/sys/include/np/lex.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sys/include/np/lex.h') 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, /* */ + /* 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; }; /* -- cgit v1.2.3