Skip to content

Commit a5b289e

Browse files
committed
Fixing bug
1 parent 505f90c commit a5b289e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Lexer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ public function __construct()
7676
public function tokenize($input)
7777
{
7878
$tokens = [];
79-
$chars = str_split($input);
8079

81-
if (!$chars) {
80+
if ($input === '') {
8281
goto eof;
8382
}
8483

84+
$chars = str_split($input);
85+
8586
consume:
8687

8788
$current = current($chars);

0 commit comments

Comments
 (0)