Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / Parser.cpp
diff options
context:
space:
mode:
1 files changed, 4 insertions, 1 deletions
-rw-r--r--JSImpl/src/Parser.cpp5
diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp
index 00907a0..8f415fb 100644
--- a/JSImpl/src/Parser.cpp
+++ b/JSImpl/src/Parser.cpp
@@ -140,7 +140,8 @@ ExpressionPtr Parser::PrimaryExpression(NormalType a)
{
if (a == NormalType::Initial)
{
- return SimpleExpression();
+ auto simple = SimpleExpression();
+ return simple;
}
if (auto simple = SimpleExpression())
@@ -682,9 +683,11 @@ ExpressionPtr Parser::ConditionalExpression(NormalType a, AllowType b)
if (Match(TokenType::QuestionMark))
{
auto trueExpr= AssignmentExpression(NormalType::Normal, b);
+ (void)trueExpr;
if (Match(TokenType::Colon))
{
auto falseExpr = AssignmentExpression(NormalType::Normal, b);
+ (void)falseExpr;
// TODO implement trinary operator
assert(false);
return ExpressionPtr();