lexer: Add TT_COLONDUB and putback buffer

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-03-21 08:32:14 -04:00
parent cb3b3a6817
commit 7b45b6f260
3 changed files with 53 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
* @lex_buf: Used to reduce system call frequency
* @lex_buf_cap: Lexer buffer capacity
* @lex_buf_i: Lexer buffer index
* @lex_putback: Lexer putback buffer
*/
struct quip_state {
int in_fd;
@@ -30,6 +31,7 @@ struct quip_state {
char lex_buf[LEX_FILEBUF_LEN];
size_t lex_buf_cap;
size_t lex_buf_i;
char lex_putback;
};
/*

View File

@@ -19,6 +19,7 @@ typedef enum {
TT_NAME, /* [name] */
TT_NEWLINE, /* [newline] */
TT_COLON, /* ':' */
TT_COLONDUB, /* '::' */
} tt_t;
/*