Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Align end of statement handling with STD.
Fixes RT#102690 and maybe more.
  • Loading branch information
jnthn committed Mar 9, 2013
1 parent d9dc404 commit a91c1e8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Perl6/Grammar.pm
Expand Up @@ -963,7 +963,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {

token eat_terminator {
|| ';'
|| <?MARKED('endstmt')>
|| <?MARKED('endstmt')> <.ws>
|| <?before ')' | ']' | '}' >
|| $
|| <?stopper>
Expand Down Expand Up @@ -1036,7 +1036,15 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
token terminator:sym<given> { 'given' <.end_keyword> }
token terminator:sym<when> { 'when' <.end_keyword> }

token stdstopper { <?terminator> }
token stdstopper {
[
|| <?MARKED('endstmt')> <?>
|| [
| <?terminator>
| $
]
]
}

## Statement control

Expand Down Expand Up @@ -2934,6 +2942,8 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}

token postfixish {
<!stdstopper>

# last whitespace didn't end here
<!MARKED('ws')>

Expand Down

0 comments on commit a91c1e8

Please sign in to comment.