Refactoring some stuff in the parser lib, moving functions out of headers
This commit is contained in:
parent
4580d68951
commit
fb3a2d94a0
19 changed files with 522 additions and 608 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#include "./lexer.h"
|
||||
#include "./length.h"
|
||||
#include "./unicode.h"
|
||||
#include "./input.h"
|
||||
#include "me/mem/mem.h"
|
||||
#include "me/types.h"
|
||||
#include <string.h>
|
||||
|
|
@ -69,7 +69,7 @@ static void ts_lexer__get_lookahead(Lexer *self)
|
|||
}
|
||||
|
||||
const t_u8 *chunk = (const t_u8 *)self->chunk + position_in_chunk;
|
||||
UnicodeDecodeFunction decode = self->input.encoding == TSInputEncodingUTF8 ? ts_decode_utf8 : ts_decode_utf16;
|
||||
UnicodeDecodeFunction decode = ts_decode_ascii;
|
||||
|
||||
self->lookahead_size = decode(chunk, size, &self->data.lookahead);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue