Fix locus of strings
This commit is contained in:
@@ -345,10 +345,23 @@ convert_current_token_to_token (token_type tt)
|
|||||||
for (uint8_t i = 0; i < STACK_SIZE (strings); i++)
|
for (uint8_t i = 0; i < STACK_SIZE (strings); i++)
|
||||||
{
|
{
|
||||||
if (current_token_equals_to_lp (STACK_ELEMENT (strings, i)))
|
if (current_token_equals_to_lp (STACK_ELEMENT (strings, i)))
|
||||||
|
{
|
||||||
|
if (tt == TOK_STRING)
|
||||||
|
{
|
||||||
|
// locus must point to the first '"'
|
||||||
|
return (token)
|
||||||
|
{
|
||||||
|
.type = tt,
|
||||||
|
.loc = current_locus () - 1,
|
||||||
|
.uid = i
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return create_token (tt, i);
|
return create_token (tt, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const lp_string str = (lp_string)
|
const lp_string str = (lp_string)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user