diff options
| Commit | 407a57944600619a6693dfc4d8c525163bea0e13 (patch) | |
|---|---|---|
| Author | 2020-11-02 09:05:58 +0200 | |
| Committer | 2020-11-09 22:08:19 +0200 | |
| Files | 6094d4c5dac3af5c56e1bc379a16a32f60b66103 /JSImpl/src | |
| IPL-407a57944600619a6693dfc4d8c525163bea0e13.tar IPL-407a57944600619a6693dfc4d8c525163bea0e13.tar.gz IPL-407a57944600619a6693dfc4d8c525163bea0e13.zip | ||
| Parent | 0d0159f70b0f3b23d6a4187d43167ded6b104e0f (diff) | |
Fix value of LiteralString nodes
1 files changed, 5 insertions, 1 deletions
| -rw-r--r-- | JSImpl/src/Parser.cpp | 6 |
diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp index 89ba3df..bc4920f 100644 --- a/JSImpl/src/Parser.cpp +++ b/JSImpl/src/Parser.cpp @@ -320,7 +320,11 @@ ExpressionPtr Parser::SimpleExpression() } else if (Match(TokenType::String)) { - return IPLMakeSharePtr<LiteralString>(Prev().Lexeme); + const auto& lexeme = Prev().Lexeme; + const auto length = lexeme.length(); + assert(length >= 2); + auto value = lexeme.substr(1, length-2); + return IPLMakeSharePtr<LiteralString>(value); } else if (Match(TokenType::Null)) { |
