mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use yul::test::parse in libyul/SynaxtTests to support objects
This commit is contained in:
parent
98faf82d3f
commit
e7c99918ed
@ -26,6 +26,8 @@
|
||||
#include <test/libyul/Common.h>
|
||||
#include <test/libyul/SyntaxTest.h>
|
||||
|
||||
#include <test/libsolidity/util/SoltestErrors.h>
|
||||
|
||||
#include <test/Common.h>
|
||||
|
||||
using namespace std;
|
||||
@ -43,17 +45,9 @@ void SyntaxTest::parseAndAnalyze()
|
||||
string const& source = m_sources.begin()->second;
|
||||
|
||||
ErrorList errorList{};
|
||||
ErrorReporter errorReporter{errorList};
|
||||
|
||||
auto scanner = make_shared<Scanner>(CharStream(source, name));
|
||||
auto parserResult = yul::Parser(errorReporter, *m_dialect).parse(scanner, false);
|
||||
|
||||
if (parserResult)
|
||||
{
|
||||
yul::AsmAnalysisInfo analysisInfo;
|
||||
yul::AsmAnalyzer(analysisInfo, errorReporter, *m_dialect).analyze(*parserResult);
|
||||
}
|
||||
|
||||
soltestAssert(m_dialect, "");
|
||||
// Silently ignoring the results.
|
||||
yul::test::parse(source, *m_dialect, errorList);
|
||||
for (auto const& error: errorList)
|
||||
{
|
||||
int locationStart = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user