mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Report meaningful error if parsing a version pragma failed
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <liblangutil/Token.h>
|
||||
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -86,7 +87,9 @@ public:
|
||||
SemVerMatchExpressionParser(std::vector<Token> _tokens, std::vector<std::string> _literals):
|
||||
m_tokens(std::move(_tokens)), m_literals(std::move(_literals))
|
||||
{}
|
||||
SemVerMatchExpression parse();
|
||||
|
||||
/// Returns an expression if it was parseable, or nothing otherwise.
|
||||
std::optional<SemVerMatchExpression> parse();
|
||||
|
||||
private:
|
||||
void reset();
|
||||
|
||||
Reference in New Issue
Block a user