mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibJS: Strip double-quote characters from StringLiteral tokens
This is very hackish since I'm just doing it to make progress on something else. :^)
This commit is contained in:
parent
c0e6234219
commit
f94099f796
1 changed files with 3 additions and 0 deletions
|
@ -216,6 +216,9 @@ double Token::double_value() const
|
||||||
|
|
||||||
String Token::string_value() const
|
String Token::string_value() const
|
||||||
{
|
{
|
||||||
|
if (m_value.length() >= 2 && m_value[0] == '"' && m_value[m_value.length() - 1]) {
|
||||||
|
return m_value.substring_view(1, m_value.length() - 2);
|
||||||
|
}
|
||||||
// FIXME: unescape the string and remove quotes
|
// FIXME: unescape the string and remove quotes
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue