Skip to content

Commit

Permalink
Changes in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jun 9, 2019
1 parent 10df0b7 commit aab3fef
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
23 changes: 16 additions & 7 deletions README.md
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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.

Expand All @@ -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.
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion lib/Perl6/Type.pm6
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion t/02-type-graph.t
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion t/test-type-graph.txt
Expand Up @@ -26,4 +26,4 @@ role R::C does R does R::A

[Core]
# core
module Test
module Test

0 comments on commit aab3fef

Please sign in to comment.