Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
\r and \t in heredoc don't participate in dedent.
  • Loading branch information
jnthn committed Nov 12, 2015
1 parent 74fcb36 commit 2cac8c1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Perl6/Actions.nqp
Expand Up @@ -8473,13 +8473,21 @@ class Perl6::QActions is HLL::Actions does STDActions {
}
}
method backslash:sym<o>($/) { make self.ints_to_string( $<octint> ?? $<octint> !! $<octints><octint> ) }
method backslash:sym<r>($/) { make "\r" }
method backslash:sym<r>($/) {
make nqp::can($/.CURSOR, 'parsing_heredoc')
?? QAST::SVal.new( :value("\r") )
!! "\r";
}
method backslash:sym<rn>($/) {
make nqp::can($/.CURSOR, 'parsing_heredoc')
?? QAST::SVal.new( :value("\r\n") )
!! "\r\n";
}
method backslash:sym<t>($/) { make "\t" }
method backslash:sym<t>($/) {
make nqp::can($/.CURSOR, 'parsing_heredoc')
?? QAST::SVal.new( :value("\t") )
!! "\t";
}
method backslash:sym<x>($/) { make self.ints_to_string( $<hexint> ?? $<hexint> !! $<hexints><hexint> ) }
method backslash:sym<0>($/) { make "\c[0]" }

Expand Down

0 comments on commit 2cac8c1

Please sign in to comment.