Skip to content

Commit

Permalink
detect obsolete use of -> as postfix; fixes RT #65212
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Apr 6, 2010
1 parent 5094077 commit e54dc62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -1577,6 +1577,15 @@ token prefix:sym<--> { <sym> <O('%autoincrement')> }
token postfix:sym<++> { <sym> <O('%autoincrement')> }
token postfix:sym<--> { <sym> <O('%autoincrement')> }

# TODO: report the correct bracket in error message
token postfix:sym«->» {
<sym>
[
| ['[' | '{' | '(' ] <.obs('->(), ->{} or ->[] as postfix dereferencer', '.(), .[] or .{} to deref, or whitespace to delimit a pointy block')>
| <.obs('-> as postfix', 'either . to call a method, or whitespace to delimit a pointy block')>
]
}

token infix:sym<**> { <sym> <O('%exponentiation')> }

token prefix:sym<+> { <sym> <O('%symbolic_unary, :pirop<set N*>')> }
Expand Down

0 comments on commit e54dc62

Please sign in to comment.