Skip to content

Commit

Permalink
Merge branch 3.x of github.com:phplrt/phplrt
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Jul 28, 2024
1 parent b0d4421 commit a00c827
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,12 @@ public function lex($source, int $offset = 0): iterable
}

$unknown = [];
$skip = array_flip($this->skip);

try {
foreach ($this->driver->run($this->tokens, $source, $offset) as $token) {
// Process "hidden" tokens.
if (\in_array($token->getName(), $this->skip, true)) {
if (isset($skip[$token->getName()])) {
if (($handledToken = $this->handleHiddenToken($source, $token)) !== null) {
yield $handledToken;
}
Expand Down

0 comments on commit a00c827

Please sign in to comment.