Skip to content

Commit ec25280

Browse files
committed
Fix unrecognized token errors
1 parent 3fe56fc commit ec25280

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Parser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Phplrt\Contracts\Source\ReadableInterface;
1212
use Phplrt\Contracts\Source\SourceFactoryInterface;
1313
use Phplrt\Lexer\Config\NullHandler;
14+
use Phplrt\Lexer\Config\PassthroughHandler;
1415
use Phplrt\Lexer\Lexer;
1516
use Phplrt\Parser\BuilderInterface;
1617
use Phplrt\Parser\Context;
@@ -114,7 +115,7 @@ private function createLexer(array $grammar): Lexer
114115
return new Lexer(
115116
tokens: $grammar['tokens']['default'],
116117
skip: $grammar['skip'],
117-
onUnknownToken: new NullHandler(),
118+
onUnknownToken: new PassthroughHandler(),
118119
);
119120
}
120121

0 commit comments

Comments
 (0)