|
4 | 4 |
|
5 | 5 | =SUBTITLE Namespace for holding RakuDoc related classes |
6 | 6 |
|
7 | | - package RakuAST::Doc { } |
| 7 | +=begin code |
| 8 | +package RakuAST::Doc { } |
| 9 | +=end code |
8 | 10 |
|
9 | 11 | The C<RakuAST::Doc> package serves as a common namespace for all |
10 | 12 | classes that provide RakuDoc functionality. |
11 | 13 |
|
12 | | -Support for L<C<RakuAST>|/type/RakuAST> functionality is available in language version |
13 | | -C<6.e+> and was added in Rakudo compiler release 2023.02. In earlier |
14 | | -language versions it is only available when specifying: |
15 | | - |
16 | | - use experimental :rakuast; |
17 | | - |
18 | 14 | =head1 Classes |
19 | 15 |
|
20 | 16 | Relations between the C<RakuAST::Doc::> classes: |
21 | 17 |
|
22 | 18 | =for code :lang<ascii-diagram> |
23 | | - RakuAST::Doc::Block |
24 | | - \- paragraphs |
25 | | - |- string |
26 | | - |- RakuAST::Doc::Paragraph |
27 | | - | \- atoms |
28 | | - | |- string |
29 | | - | \- RakuAST::Doc::Markup |
30 | | - | \- atoms |
31 | | - | |- string |
32 | | - | \- RakuAST::Doc::Markup |
33 | | - \- RakuAST::Doc::Block |
| 19 | +RakuAST::Doc::Block |
| 20 | + \- paragraphs |
| 21 | + |- string |
| 22 | + |- RakuAST::Doc::Paragraph |
| 23 | + | \- atoms |
| 24 | + | |- string |
| 25 | + | \- RakuAST::Doc::Markup |
| 26 | + | \- atoms |
| 27 | + | |- string |
| 28 | + | \- RakuAST::Doc::Markup |
| 29 | + \- RakuAST::Doc::Block |
34 | 30 |
|
35 | 31 | Note that this structure is recursive with regards to the |
36 | 32 | L«C<RakuAST::Doc::Block>|/type/RakuAST::Doc::Block» object (which can |
@@ -78,7 +74,7 @@ This is L<B<example>|https://example.com>>. |
78 | 74 |
|
79 | 75 | is represented in C<RakuAST::Doc::> objects like this: |
80 | 76 |
|
81 | | -=begin code :preamble<use experimental :rakuast> |
| 77 | +=begin code |
82 | 78 | RakuAST::Doc::Block.new( |
83 | 79 | type => "rakudoc", |
84 | 80 | paragraphs => ( |
@@ -131,7 +127,7 @@ my $foo; #= really! |
131 | 127 |
|
132 | 128 | is represented like this: |
133 | 129 |
|
134 | | -=begin code :preamble<use experimental :rakuast> |
| 130 | +=begin code |
135 | 131 | RakuAST::VarDeclaration::Simple.new( |
136 | 132 | sigil => "\$", |
137 | 133 | desigilname => RakuAST::Name.from-identifier("foo") |
|
0 commit comments