Optimize rune_is_* procedures for tokenizer

This commit is contained in:
gingerBill
2020-05-27 12:43:49 +01:00
parent 6ac0fb80a6
commit 4e21a4d46a
2 changed files with 6 additions and 4 deletions

View File

@@ -937,8 +937,10 @@ Token tokenizer_get_token(Tokenizer *t) {
}
Token token = {};
token.string = {t->curr, 1};
token.pos.file = t->fullpath;
token.string.text = t->curr;
token.string.len = 1;
token.pos.file.text = t->fullpath.text;
token.pos.file.len = t->fullpath.len;
token.pos.line = t->line_count;
token.pos.offset = t->curr - t->start;
token.pos.column = t->curr - t->line + 1;