Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / Parser.cpp
diff options
context:
space:
mode:
Commit11380dc5c1acaa957430c4e00cc04bfc1478248f (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-10-22 21:52:05 +0300
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-10-24 19:43:48 +0300
Files7b788ef6aaa1a59c2b28210dbbc00d5a7e8dadc6 /JSImpl/src/Parser.cpp
IPL-11380dc5c1acaa957430c4e00cc04bfc1478248f.tar
IPL-11380dc5c1acaa957430c4e00cc04bfc1478248f.tar.gz
IPL-11380dc5c1acaa957430c4e00cc04bfc1478248f.zip
Parent75993cc48f8e72f7aee4ddf857001dbfcd36f3ac (diff)
Fixed parsing of some unary expressions
1 files changed, 2 insertions, 1 deletions
-rw-r--r--JSImpl/src/Parser.cpp3
diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp
index 97ad735..4e1fbca 100644
--- a/JSImpl/src/Parser.cpp
+++ b/JSImpl/src/Parser.cpp
@@ -350,9 +350,10 @@ ExpressionPtr Parser::Unary()
TokenType::PlusPlus,
}))
{
+ auto op = Prev().Type;
auto ls = LeftSideExpression();
auto suffix = false;
- return IPLMakeSharePtr<UnaryExpression>(ls, Prev().Type, suffix);
+ return IPLMakeSharePtr<UnaryExpression>(ls, op, suffix);
}
else if (MatchOneOf({
TokenType::Void,