Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cheat on constant heredocs that have nothing after
  • Loading branch information
TimToady committed Apr 10, 2015
1 parent fd3a7a8 commit d5e2d1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Perl6/Grammar.nqp
Expand Up @@ -173,6 +173,10 @@ role STD {
}
}

token cheat_heredoc {
[ <?{ +@herestub_queue }> \h* <[ ; } ]> <.ws> <?MARKER('endstmt')> ]?
}

method queue_heredoc($delim, $lang) {
nqp::ifnull(@herestub_queue, @herestub_queue := []);
nqp::push(@herestub_queue, Herestub.new(:$delim, :$lang, :orignode(self)));
Expand Down Expand Up @@ -3176,6 +3180,8 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
|| <initializer>
|| <.missing: "initializer on constant declaration">
]

<.cheat_heredoc>
}

proto token initializer { <...> }
Expand Down

0 comments on commit d5e2d1e

Please sign in to comment.