Skip to content

Commit

Permalink
add a parsing comment, as advised by pmichaud++
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Aug 20, 2010
1 parent 7e966fa commit 7b00312
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -1835,6 +1835,9 @@ token infix:sym<~~> { <sym> <O('%chaining')> <!dumbsmart> }
token infix:sym<!~~> { <sym> <O('%chaining')> <!dumbsmart> }

token dumbsmart {
# should be
# 'Bool::'? True && <.longname>
# once && in regexes is implemented
| <?before \h* 'Bool::'? 'True' » <!before \w | \:> > <.panic("Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead")>
| <?before \h* 'Bool::'? 'False' » <!before \w | \:> > <.panic("Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead")>
}
Expand Down

0 comments on commit 7b00312

Please sign in to comment.