diff options
author | kartofen <mladenovnasko0@gmail.com> | 2024-08-30 17:01:28 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2024-08-30 17:01:28 +0300 |
commit | e1ceef73192f0300ff9b10ba9a16475fbebeaa5f (patch) | |
tree | 0cb2bc5336a522b965c1d171b433044591721e20 /src/lexer.h | |
parent | de3a062bfc206bf0373f96f4f6cc8c74ffcbab48 (diff) |
proper repl, stylistic changes, removed trailing whitespace
Diffstat (limited to 'src/lexer.h')
-rw-r--r-- | src/lexer.h | 5 |
1 files changed, 3 insertions, 2 deletions
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); |