lexer: use Str_from_buf
here
Instead of handcrafting the `Str` struct.
This commit is contained in:
parent
0bedfa70c5
commit
33c8f0b841
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ string_literal(LexState *ls)
|
|||
}
|
||||
|
||||
token.id = T_STRING;
|
||||
token.str = (Str){str_buf, i};
|
||||
token.str = Str_from_buf(str_buf, i);
|
||||
token.len = i;
|
||||
return token;
|
||||
err:
|
||||
|
|
Loading…
Add table
Reference in a new issue