[tokenization] Adding a version which of tokenize which keeps whitespace tokens
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "token_types.h"
|
||||
#include "tokens.h"
|
||||
|
||||
@@ -16,7 +18,8 @@ uint16_t scan_token(scanner_t *s);
|
||||
|
||||
scanner_t scanner_from_string(const char *input, size_t len);
|
||||
|
||||
void tokenize_add_tokens(token_array *tokens, const char *input, size_t len);
|
||||
void tokenize_add_tokens(token_array *tokens, const char *input, size_t len, bool keep_whitespace);
|
||||
token_array *tokenize_keep_whitespace(const char *input);
|
||||
token_array *tokenize(const char *input);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user