aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-06-09 06:21:51 +0800
committerchriseth <c@ethdev.com>2016-06-09 06:21:51 +0800
commitd593166d66dba3f95df9d4096f45761ca0f86626 (patch)
tree6d091d5d5046d4041b74d1dba9c9602b00319fcc
parent093790d7c7b7ba68c44beb53b28f54669bb7e69f (diff)
parent0cb820cf98a2c6b95abcfb42ea5f094c3240a7d4 (diff)
downloaddexon-solidity-d593166d66dba3f95df9d4096f45761ca0f86626.tar.gz
dexon-solidity-d593166d66dba3f95df9d4096f45761ca0f86626.tar.zst
dexon-solidity-d593166d66dba3f95df9d4096f45761ca0f86626.zip
Merge pull request #641 from axic/patch/shift-parser
Trivial shift parser fixes
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp2
-rw-r--r--libsolidity/parsing/Token.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 16677093..b973a117 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -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."));
}
diff --git a/libsolidity/parsing/Token.h b/libsolidity/parsing/Token.h
index f28df8bf..703e88f6 100644
--- a/libsolidity/parsing/Token.h
+++ b/libsolidity/parsing/Token.h
@@ -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; }