Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove wrong and duplicate optimization.
We don't know that the atom we're looking at really can cope with us
swallowing multiple chars into the literal at this point; we may be
in a goal or a separator. Rather than fix it, it can simply go away,
since there's code in the termish action method that does the very
same optimization, but more generally, and when we know it's safe. So
we don't lose out, but we do lose a couple of weird bugs.
  • Loading branch information
jnthn committed Jun 30, 2015
1 parent 57e8469 commit 5263e63
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/QRegex/P6Regex/Grammar.nqp
Expand Up @@ -221,11 +221,8 @@ grammar QRegex::P6Regex::Grammar is HLL::Grammar {
# :dba('regex atom')
[
| \w
[
| \w+! <?before \w>
| <?before ' ' \w> <!{ %*RX<s> || $*HAS_GOAL }> <.worry("Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)")>
]?
<.SIGOK>
[ <?before ' ' \w> <!{ %*RX<s> || $*HAS_GOAL }> <.worry("Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)")> ]?
<.SIGOK>
| <metachar>
]
}
Expand Down

0 comments on commit 5263e63

Please sign in to comment.