LibJS: Unescape strings in Token::string_value()

This commit is contained in:
Stephan Unverwerth 2020-03-14 13:39:05 +01:00 committed by Andreas Kling
parent 644b4f4201
commit 3389021291
Notes: sideshowbarker 2024-07-19 08:18:38 +09:00
2 changed files with 59 additions and 9 deletions

View file

@ -1,7 +1,12 @@
var d = "Double quoted string";
var s = 'Single quoted string';
var e = "Escaped characters \n \" \t \\"
var d = "Double quoted string\n";
print(d);
var s = 'Single quoted string\n';
print(s)
var e = "Escaped characters \b \f \n \r \t \v \' \" \\ \n";
print(e)
var u = "Unterminated string
this is not possible in js"
this is not possible in js\n";
print(u);
var u2 = 'This is neither
var u2 = 'This is neither\n
print(u2);