diff options
author | chriseth <chris@ethereum.org> | 2017-12-13 21:40:54 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-01-06 09:23:38 +0800 |
commit | 124190336b0a70ea32d5f8ca0c4b364f1fc774d0 (patch) | |
tree | 6be4f7815f417c9343ed57a85ec51f77f0c53aff /test | |
parent | 2548228b365d56612e2f039f735be0fdf6ce0807 (diff) | |
download | dexon-solidity-124190336b0a70ea32d5f8ca0c4b364f1fc774d0.tar.gz dexon-solidity-124190336b0a70ea32d5f8ca0c4b364f1fc774d0.tar.zst dexon-solidity-124190336b0a70ea32d5f8ca0c4b364f1fc774d0.zip |
Split inline assembly into loose and strict flavours.
Diffstat (limited to 'test')
-rw-r--r-- | test/libjulia/Common.cpp | 5 | ||||
-rw-r--r-- | test/libjulia/Parser.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/test/libjulia/Common.cpp b/test/libjulia/Common.cpp index da1538f3..e1ab8215 100644 --- a/test/libjulia/Common.cpp +++ b/test/libjulia/Common.cpp @@ -52,15 +52,16 @@ void dev::julia::test::printErrors(ErrorList const& _errors, Scanner const& _sca pair<shared_ptr<Block>, shared_ptr<assembly::AsmAnalysisInfo>> dev::julia::test::parse(string const& _source, bool _julia) { + auto flavour = _julia ? assembly::AsmFlavour::IULIA : assembly::AsmFlavour::Strict; ErrorList errors; ErrorReporter errorReporter(errors); auto scanner = make_shared<Scanner>(CharStream(_source), ""); - auto parserResult = assembly::Parser(errorReporter, _julia).parse(scanner); + auto parserResult = assembly::Parser(errorReporter, flavour).parse(scanner); if (parserResult) { BOOST_REQUIRE(errorReporter.errors().empty()); auto analysisInfo = make_shared<assembly::AsmAnalysisInfo>(); - assembly::AsmAnalyzer analyzer(*analysisInfo, errorReporter, _julia); + assembly::AsmAnalyzer analyzer(*analysisInfo, errorReporter, flavour); if (analyzer.analyze(*parserResult)) { BOOST_REQUIRE(errorReporter.errors().empty()); diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp index 3ca62a90..a8a41b3c 100644 --- a/test/libjulia/Parser.cpp +++ b/test/libjulia/Parser.cpp @@ -52,11 +52,11 @@ bool parse(string const& _source, ErrorReporter& errorReporter) try { auto scanner = make_shared<Scanner>(CharStream(_source)); - auto parserResult = assembly::Parser(errorReporter, true).parse(scanner); + auto parserResult = assembly::Parser(errorReporter, assembly::AsmFlavour::IULIA).parse(scanner); if (parserResult) { assembly::AsmAnalysisInfo analysisInfo; - return (assembly::AsmAnalyzer(analysisInfo, errorReporter, true)).analyze(*parserResult); + return (assembly::AsmAnalyzer(analysisInfo, errorReporter, assembly::AsmFlavour::IULIA)).analyze(*parserResult); } } catch (FatalError const&) |