From 1945dbf8345a2b59e9057d21e38c78913272bdaa Mon Sep 17 00:00:00 2001 From: kartofen Date: Sat, 16 Nov 2024 17:20:23 +0200 Subject: cleanup and minor refactoring --- src/lexer.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lexer.h') diff --git a/src/lexer.h b/src/lexer.h index 632811e..0cbda75 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -68,9 +68,17 @@ 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); +char *token_value_static_string(struct token *token); void token_clone(struct token *dest, struct token *src); void token_dealloc(struct token *token); -void toklist_destroy(struct toklist *toklist); + +struct toklist *toklist_alloc(struct token *tokens, size_t tokens_len); +void toklist_dealloc(struct toklist *toklist); + +#ifdef DEBUG +void token_print(struct token *token); +void toklist_print(struct toklist *toklist); +#endif #endif -- cgit v1.2.3