feat: expose the lexer to be used by users

This commit is contained in:
Laytan Laats
2023-04-11 22:38:29 +02:00
parent f98b59a5f0
commit 6b3673ece4
3 changed files with 41 additions and 13 deletions

View File

@@ -81,6 +81,14 @@ func (v *Version) InRange(s, e *Version) bool {
return v.Compare(s) >= 0 && v.Compare(e) <= 0
}
func (v *Version) InPhp7Range() bool {
return v.InRange(php7RangeStart, php7RangeEnd)
}
func (v *Version) InPhp8Range() bool {
return v.InRange(php8RangeStart, php8RangeEnd)
}
// Compare compares this version to another one. It returns -1, 0, or 1 if
// the version smaller, equal, or larger than the other version.
func (v *Version) Compare(o *Version) int {