aboutsummaryrefslogtreecommitdiff
path: root/lib/Grammar/Version/Semantic.pm6
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Grammar/Version/Semantic.pm6')
-rw-r--r--lib/Grammar/Version/Semantic.pm620
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Grammar/Version/Semantic.pm6 b/lib/Grammar/Version/Semantic.pm6
index 8656f01..aac3b72 100644
--- a/lib/Grammar/Version/Semantic.pm6
+++ b/lib/Grammar/Version/Semantic.pm6
@@ -38,12 +38,32 @@ token patch {
=head1 Synopsis
+=item1 Grammar::Version::Semantic.parse(Str $);
+
=head1 Description
+A grammar for parisng the SemVer spec in the Raku programming language.
+
=head1 Examples
+=begin input
+use Grammar::Version::Semantic;
+say Grammar::Version::Semantic.parse('2020.01.1-rc2');
+=end input
+
+=begin output
+「2020.01.1-rc2」
+ major => 「2020」
+ minor => 「01」
+ patch => 「1」
+ pre-release => 「rc2」
+=end output
+
=head1 See also
+=item1 https://semver.org/
+=item1 L<Version::Semantic|https://modules.raku.org/dist/Version::Semantic:cpan:TYIL>
+
=end pod
# vim: ft=perl6 noet