From aab3fefc7cb69b6328044386dca41aef9a717535 Mon Sep 17 00:00:00 2001 From: JJ Merelo Date: Sun, 9 Jun 2019 10:37:27 +0200 Subject: [PATCH] Changes in documentation --- README.md | 23 ++++++++++++++++------- lib/Perl6/Type.pm6 | 2 +- t/02-type-graph.t | 1 - t/test-type-graph.txt | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c91607f..427a864 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # NAME -Pod::Load - Parse a file and returns a type graph. +Perl6::TypeGraph - Parse a description of the types for documentation. # SYNOPSIS @@ -20,9 +20,10 @@ Pod::Load - Parse a file and returns a type graph. # DESCRIPTION -Perl6::Typegraph creates a graph of all types in a file. It gives you info about what classes a type inherits from and the roles it does. In addition, it also computes the inversion of this relations, which let you know what types inherit a given type and the types implementing a specific role. +Perl6::Typegraph creates a graph of all types in a file that describes +them. It gives you info about what classes a type inherits from and the roles it does. In addition, it also computes the inversion of this relations, which let you know what types inherit a given type and the types implementing a specific role. -All types are represented using a `Perl6::Type` objec. +All types are represented using a `Perl6::Type` object. # FILE SYNTAX @@ -38,7 +39,9 @@ All types are represented using a `Perl6::Type` objec. - Supported packagetypes: `class`, `module`, `role` and `enum`. -- Supported typenames: whatever string following the syntax `class1::class2::class3 ...`. +- Supported typenames: whatever string following the syntax + `class1::class2::class3 ...`; `class` follows the usual identifier + format that might include apostrophes and dashes. - `[role-signature]` is not processed, but you can add it anyway. @@ -55,6 +58,10 @@ Example: enum Bool is Int module Test +(whitespace is only included for appearance, it does not have any +meaning) + + ### has Associative %.types Format: \$name => Perl6::Type. @@ -89,14 +96,16 @@ Parse the file (using the Decl grammar) and initialize %.types and @.sorted method topo-sort() returns Mu ``` -This method takes all Perl6::Type objects in %.types and sort them by its name. After that, recursively, add all roles and supers in the object to @!sorted +This method takes all Perl6::Type objects in `%.types` and sort them +by its name. After that, recursively, add all roles and supers in the +object to `@!sorted` # AUTHOR -Moritz <@moritz> Antonio Gámiz <@antoniogamiz> +Moritz Lenz <@moritz> Antonio Gámiz <@antoniogamiz> # COPYRIGHT AND LICENSE -This module has been spinned off from the Official Doc repo, if you want to see the past changes go to the [official doc](https://github.com/perl6/doc). +This module is a spin-off from the Official Doc repo, if you want to see the past changes go to the [official doc](https://github.com/perl6/doc). Copyright 2019 Moritz and Antonio This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0. diff --git a/lib/Perl6/Type.pm6 b/lib/Perl6/Type.pm6 index 3d323b4..d484574 100644 --- a/lib/Perl6/Type.pm6 +++ b/lib/Perl6/Type.pm6 @@ -31,7 +31,7 @@ this one, and if it's a role, all types implementing it. =head1 AUTHOR -Moritz <@moritz> +Moritz Lenz <@moritz> Antonio Gámiz <@antoniogamiz> =head1 COPYRIGHT AND LICENSE diff --git a/t/02-type-graph.t b/t/02-type-graph.t index 079c0bc..0e4b007 100644 --- a/t/02-type-graph.t +++ b/t/02-type-graph.t @@ -21,7 +21,6 @@ subtest { is-deeply $tg.types.values».packagetype.flat.unique.sort, @packages, "All supported packagetypes detected"; - say $tg.types.values.sort; is $tg.types.values.sort, @types, "All types detected"; diff --git a/t/test-type-graph.txt b/t/test-type-graph.txt index 2609657..4c1e5ac 100644 --- a/t/test-type-graph.txt +++ b/t/test-type-graph.txt @@ -26,4 +26,4 @@ role R::C does R does R::A [Core] # core -module Test \ No newline at end of file +module Test