Some well-formedness checks for the Yul AST.

This commit is contained in:
chriseth
2018-10-22 15:52:26 +02:00
parent c13b5280c1
commit 19be6cd818
5 changed files with 51 additions and 4 deletions
+1
View File
@@ -209,6 +209,7 @@ u256 Pattern::d() const
{
Literal const& literal = boost::get<Literal>(matchGroupValue());
assertThrow(literal.kind == assembly::LiteralKind::Number, OptimizerException, "");
assertThrow(isValidDecimal(literal.value) || isValidHex(literal.value), OptimizerException, "");
return u256(literal.value);
}