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
Notes:
sideshowbarker
2024-07-19 08:18:57 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f94099f796a
1 changed files with 3 additions and 0 deletions
|
@ -216,6 +216,9 @@ double Token::double_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
|
||||
return m_value;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue