mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix locus of strings
This commit is contained in:
parent
64a0d8a8b0
commit
e91cb75dcc
@ -346,7 +346,20 @@ convert_current_token_to_token (token_type tt)
|
||||
{
|
||||
if (current_token_equals_to_lp (STACK_ELEMENT (strings, i)))
|
||||
{
|
||||
return create_token (tt, 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user