Browse Source

A bit more

main
Dustin Wilson 3 years ago
parent
commit
5adf6b3107
  1. 6
      lib/Tokenizer.php

6
lib/Tokenizer.php

@ -89,7 +89,6 @@ class Tokenizer {
$currentRules = end($this->ruleStack)->patterns;
$currentRulesCount = count($currentRules);
for ($i = 0; $i < $currentRulesCount; $i++) {
while (true) {
$rule = $currentRules[$i];
@ -248,9 +247,7 @@ class Tokenizer {
if ($this->activeInjection === null && $this->grammar->injections !== null) {
foreach ($this->grammar->injections as $selector => $injection) {
$selector = ScopeParser::parseSelector($selector);
if ($selector->matches($this->scopeStack)) {
$prefix = $selector->getPrefix($this->scopeStack);
if ($prefix !== Filter::PREFIX_LEFT) {
if ($selector->matches($this->scopeStack) && $selector->getPrefix($this->scopeStack) !== Filter::PREFIX_LEFT) {
$this->ruleStack[] = $injection;
$this->activeInjection = $injection;
@ -260,7 +257,6 @@ class Tokenizer {
}
}
}
}
break;
}

Loading…
Cancel
Save