RakuAST::Doc Reference
Namespace for holding RakuDoc related classes
What it is #
role is done by L<C<RakuAST>|/type/RakuAST> objects that allow leading and/or trailing
Position in the hierarchy #
| Inherits from | done |
| Does | — |
Examples, run three ways #
Every example below comes from the official documentation, together with the output that documentation asserts. Each was then executed by Rakudo and by Raku++ when this page was built. Where the three agree, one result is shown; where they do not, all three are — because which of them is wrong is exactly the information worth having.
7 no-output
package RakuAST::Doc { }Not executed: the documentation states no expected output for this example.
use experimental :rakuast;
Not executed: the documentation states no expected output for this example.
RakuAST::Doc::Block
\- paragraphs
|- string
|- RakuAST::Doc::Paragraph
| \- atoms
| |- string
| \- RakuAST::Doc::Markup
| \- atoms
| |- string
| \- RakuAST::Doc::Markup
\- RakuAST::Doc::BlockNot executed: the documentation states no expected output for this example.
This is L<B<example>|https://example.com>>.
Not executed: the documentation states no expected output for this example.
RakuAST::Doc::Block.new(
type => "rakudoc",
paragraphs => (
RakuAST::Doc::Paragraph.new(
"This is ",
RakuAST::Doc::Markup.new(
letter => "L",
opener => "<",
closer => ">",
atoms => (
RakuAST::Doc::Markup.new(
letter => "B",
opener => "<",
closer => ">",
atoms => (
"example",
)
),
),
meta => (
"https://example.com",
)
),
">.\n"
),
)
);Not executed: the documentation states no expected output for this example.
#| important variable my $foo; #= really!
Not executed: the documentation states no expected output for this example.
RakuAST::VarDeclaration::Simple.new(
sigil => "\$",
desigilname => RakuAST::Name.from-identifier("foo")
).declarator-docs(
leading => (
"important variable\n",
),
trailing => (
"really!\n",
)
);Not executed: the documentation states no expected output for this example.