Skip to content

Commit

Permalink
RakuAST: dump post processors on quoted strings as extras
Browse files Browse the repository at this point in the history
Post processors have significant impact on the generated code and this
code's result, so include information about them in the AST dump output.
  • Loading branch information
niner committed Jan 29, 2023
1 parent fc9cbd3 commit 0ccec24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Raku/ast/literals.rakumod
Expand Up @@ -312,6 +312,12 @@ class RakuAST::QuotedString is RakuAST::ColonPairish is RakuAST::Term
False
}

method dump-extras(int $indent) {
$!processors && nqp::elems($!processors)
?? nqp::x(' ', $indent) ~ 'postprocessors: ' ~ nqp::join(', ', $!processors) ~ "\n"
!! ''
}

method IMPL-EXPR-QAST(RakuAST::IMPL::QASTContext $context) {
# If we can constant fold it, just produce the constant.
my $literal-value := self.literal-value;
Expand Down

0 comments on commit 0ccec24

Please sign in to comment.