Yul parser hack and more yul tests.

This commit is contained in:
Daniel Kirchner 2020-05-05 17:22:54 +02:00
parent 28d25afab1
commit b580106c80
4 changed files with 8 additions and 3 deletions

View File

@ -325,6 +325,7 @@ Parser::ElementaryOperation Parser::parseElementaryOperation()
case Token::Bool:
case Token::Address:
case Token::Var:
case Token::In:
{
YulString literal{currentLiteral()};
if (m_dialect.builtin(literal))
@ -515,6 +516,7 @@ YulString Parser::expectAsmIdentifier()
case Token::Bool:
case Token::Identifier:
case Token::Var:
case Token::In:
break;
default:
expectToken(Token::Identifier);

View File

@ -30,7 +30,8 @@ contract C {
return arr[i](x);
}
}
// ====
// compileViaYul: also
// ----
// test(uint256,uint256): 10, 0 -> 11
// test(uint256,uint256): 10, 1 -> 12

View File

@ -10,6 +10,7 @@ contract C {
require(y == bytes2(0xffff));
}
}
// ====
// compileViaYul: also
// ----
// f() -> "\xff\xff\xff\xff"

View File

@ -22,7 +22,8 @@ contract C {
return garbled != garbled;
}
}
// ====
// compileViaYul: also
// ----
// test_eq_ok() -> 1
// test_eq() -> FAILURE # both should throw #