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-05-28 15:06:34 +02:00
committed by chriseth
co-authored by chriseth
parent 2276b567b1
commit 97f8ee0d1b
27 changed files with 492 additions and 140 deletions
+3 -1
View File
@@ -118,6 +118,9 @@ public:
return m_errorCount > 0;
}
// @returns true if the maximum error count has been reached.
bool hasExcessiveErrors() const;
private:
void error(
Error::Type _type,
@@ -149,4 +152,3 @@ private:
};
}