| 55 | { |
| 56 | |
| 57 | std::optional<Error> parseAndReturnFirstError(std::string const& _source, bool _allowWarningsAndInfos = true) |
| 58 | { |
| 59 | YulStack yulStack = parseYul(_source, "source", OptimiserSettings::none()); |
| 60 | if (!yulStack.hasErrorsWarningsOrInfos() || (!yulStack.hasErrors() && _allowWarningsAndInfos)) |
| 61 | return {}; |
| 62 | |
| 63 | BOOST_REQUIRE_EQUAL(yulStack.errors().size(), 1); |
| 64 | return *yulStack.errors().front(); |
| 65 | } |
| 66 | |
| 67 | bool successParse(std::string const& _source, bool _allowWarningsAndInfos = true) |
| 68 | { |
no test coverage detected