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