Add Steve Johnson-style parser recovery rules:

SourceUnit = Error $
    Block = '{' Error '}'
    ContractDefinition = '{' Error '}'
    Statement = Error ';'

Co-Authored-By: chriseth <chris@ethereum.org>
This commit is contained in:
rocky
2019-06-17 14:47:07 +02:00
committed by Christian Parpart
co-authored by chriseth
parent 633510eb04
commit ca3afea1d7
27 changed files with 492 additions and 140 deletions
@@ -0,0 +1,11 @@
pragma solidity >=0.0.0;
contract Error3 {
constructor() public {
balances[tx.origin] = ; // missing RHS.
}
}
// ----
// ParserError: (95-96): Expected primary expression.
// Warning: (95-96): Recovered in Statement at ';'.