Fix crash on empty string
This commit is contained in:
parent
a4d9e5023f
commit
501bc9eed6
@ -410,6 +410,7 @@ class Tokenizer
|
|||||||
{
|
{
|
||||||
currentToken.type = TokenType.StringLiteral;
|
currentToken.type = TokenType.StringLiteral;
|
||||||
currentToken.region.end = new(currentLocation);
|
currentToken.region.end = new(currentLocation);
|
||||||
|
currentToken.data ??= new Token.StringData("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -606,7 +607,7 @@ class Tokenizer
|
|||||||
{
|
{
|
||||||
currentToken.type = TokenType.StringLiteral;
|
currentToken.type = TokenType.StringLiteral;
|
||||||
currentToken.region.end = new(currentLocation);
|
currentToken.region.end = new(currentLocation);
|
||||||
currentToken.data = new Token.StringData("");
|
currentToken.data ??= new Token.StringData("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user