From e1ceef73192f0300ff9b10ba9a16475fbebeaa5f Mon Sep 17 00:00:00 2001 From: kartofen Date: Fri, 30 Aug 2024 17:01:28 +0300 Subject: proper repl, stylistic changes, removed trailing whitespace --- src/lexer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lexer.h') diff --git a/src/lexer.h b/src/lexer.h index b47f800..e40ab05 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -27,7 +27,7 @@ struct token { enum token_type { TOKEN_TYPES(TO_ENUM) } type; - + union { char *id; char *str; @@ -41,7 +41,7 @@ typedef struct lexer * lexer_t; struct lexer { FILE *fp; size_t line; - + char str[256]; size_t str_idx; @@ -52,6 +52,7 @@ struct lexer { lexer_t lexer_create(FILE *fp); void lexer_destroy(lexer_t lexer); +int lexer_clear_line(lexer_t lexer); int lexer_token_next(lexer_t lexer, struct token *token); int token_value_string(struct token *token, size_t buf_sz, char *buf); -- cgit v1.2.3