Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix delimited_code for multiple lines + simplify
  • Loading branch information
Mouq committed Feb 19, 2014
1 parent 24a2945 commit e08bdbb
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Perl6/Actions.nqp
Expand Up @@ -581,15 +581,12 @@ class Perl6::Actions is HLL::Actions does STDActions {

method delimited_code_content($/) {
my @t := [];
@t := $<delimited_code_content>.ast
if $<delimited_code_content><pod_string>;
if $<pod_string> {
for Perl6::Pod::merge_twines($<pod_string>) {
@t.unshift($_);
}
} elsif $<delimited_code_content> {
# Empty line
@t.unshift($*W.add_constant('Str', 'str', '').compile_time_value);
if $<delimited_code_content> {
@t := Perl6::Pod::merge_twines($<pod_string>) if $<pod_string>;
@t.push($*W.add_constant(
'Str', 'str', ~$<pod_newline>
).compile_time_value);
nqp::splice(@t, $<delimited_code_content>.ast,+@t,0);
}
make @t;
}
Expand Down

0 comments on commit e08bdbb

Please sign in to comment.