mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
committed by
chriseth
co-authored by
chriseth
parent
2276b567b1
commit
97f8ee0d1b
@@ -217,7 +217,7 @@ bool CompilerStack::parse()
|
||||
string const& path = sourcesToParse[i];
|
||||
Source& source = m_sources[path];
|
||||
source.scanner->reset();
|
||||
source.ast = Parser(m_errorReporter, m_evmVersion).parse(source.scanner);
|
||||
source.ast = Parser(m_errorReporter, m_evmVersion, m_parserErrorRecovery).parse(source.scanner);
|
||||
if (!source.ast)
|
||||
solAssert(!Error::containsOnlyWarnings(m_errorReporter.errors()), "Parser returned null but did not report error.");
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user