Merge pull request #641 from axic/patch/shift-parser

Trivial shift parser fixes
This commit is contained in:
chriseth 2016-06-09 00:21:51 +02:00
commit d593166d66
2 changed files with 3 additions and 1 deletions

View File

@ -1360,6 +1360,8 @@ void ExpressionCompiler::appendShiftOperatorCode(Token::Value _operator)
break;
case Token::SAR:
break;
case Token::SHR:
break;
default:
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Unknown shift operator."));
}

View File

@ -275,7 +275,7 @@ public:
return Value(op + (BitOr - AssignBitOr));
}
static bool isBitOp(Value op) { return (BitOr <= op && op <= SHR) || op == BitNot; }
static bool isBitOp(Value op) { return (BitOr <= op && op <= BitAnd) || op == BitNot; }
static bool isBooleanOp(Value op) { return (Or <= op && op <= And) || op == Not; }
static bool isUnaryOp(Value op) { return (Not <= op && op <= Delete) || op == Add || op == Sub || op == After; }
static bool isCountOp(Value op) { return op == Inc || op == Dec; }