diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-02-03 14:41:29 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2020-02-03 14:41:29 +0100 |
commit | f22f1ce09a4e9536f75e15e1edee0c6ca3f7b895 (patch) | |
tree | c8e6ae1c18128ed5771a200f35e4a0714a183f92 | |
parent | df571eb8e8734e85b67df179e68bd17376e2f273 (diff) | |
download | Grammar::Version::Semantic-master.tar.gz Grammar::Version::Semantic-master.tar.bz2 |
-rw-r--r-- | README.pod6 | 23 | ||||
-rw-r--r-- | lib/Grammar/Version/Semantic.pm6 | 20 |
2 files changed, 41 insertions, 2 deletions
diff --git a/README.pod6 b/README.pod6 index 9b091e5..b52a738 100644 --- a/README.pod6 +++ b/README.pod6 @@ -1,12 +1,13 @@ =begin pod -=NAME Grammar::SemVer +=NAME Grammar::Version::Semantic =AUTHOR Patrick Spek <p.spek@tyil.work> =VERSION 0.0.0 =head1 Description -A grammar ng the SemVer spec in the rogramming language +A grammar for parsing the L<SemVer|https://semver.org/> spec in the +L<Raku|https://raku.org/> programming language. =head1 Installation @@ -16,6 +17,24 @@ Install this module through L<zef|https://github.com/ugexe/zef>: zef install Grammar::SemVer =end code +=head1 Documentation + +Documentation is written as L<Pod6|https://docs.raku.org/language/pod> +documents, and can be read with C<raku>'s C<--doc> option. + +=begin input +raku --doc Grammar::Version::Semantic +=end input + +At your option, you can also use prettier readers, such as +L<C<p6doc>|https://modules.raku.org/search/?q=p6doc> or +L<C<App::Rakuman>|https://modules.raku.org/dist/App::Rakuman:cpan:TYIL>. + +=begin input +p6doc Grammar::Version::Semantic +rakuman Grammar::Version::Semantic +=end input + =head1 License This module is distributed under the terms of the AGPL-3.0. 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 |