From 11380dc5c1acaa957430c4e00cc04bfc1478248f Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Mon, 22 Oct 2018 21:52:05 +0300 Subject: Fixed parsing of some unary expressions --- JSImpl/src/Parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'JSImpl/src/Parser.cpp') 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(ls, Prev().Type, suffix); + return IPLMakeSharePtr(ls, op, suffix); } else if (MatchOneOf({ TokenType::Void, -- cgit v1.3.1-23-gd82d