diff options
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/SemVerHandler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libsolidity/analysis/SemVerHandler.h b/libsolidity/analysis/SemVerHandler.h index 3c110b19..e3b642db 100644 --- a/libsolidity/analysis/SemVerHandler.h +++ b/libsolidity/analysis/SemVerHandler.h @@ -40,6 +40,12 @@ struct SemVerVersion std::string prerelease; std::string build; + unsigned major() const { return numbers[0]; } + unsigned minor() const { return numbers[1]; } + unsigned patch() const { return numbers[2]; } + + bool isPrerelease() const { return !prerelease.empty(); } + explicit SemVerVersion(std::string const& _versionString = "0.0.0"); }; |