mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-16 14:48:32 +01:00
parent
f82a6365a5
commit
f7d484aa0e
@ -76,7 +76,7 @@ class Lexer {
|
||||
$numTokens = \count($tokens);
|
||||
if ($numTokens === 0) {
|
||||
// Empty input edge case: Just add the sentinel token.
|
||||
$tokens[] = [new Token(0, "\0", 1, 0)];
|
||||
$tokens[] = new Token(0, "\0", 1, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
6
test/code/parser/emptyFile.test
Normal file
6
test/code/parser/emptyFile.test
Normal file
@ -0,0 +1,6 @@
|
||||
Empty file
|
||||
-----
|
||||
|
||||
-----
|
||||
array(
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user