Skip to content

Commit 50fe836

Browse files
committed
Fix TokenStream.empty() not true when index at an EOF token
1 parent bca22a4 commit 50fe836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parse-css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ class TokenStream {
856856
return new EOFToken();
857857
}
858858
empty() {
859-
return this.i >= this.tokens.length;
859+
return this.nextToken() instanceof EOFToken;
860860
}
861861
consumeToken() {
862862
const tok = this.nextToken();

0 commit comments

Comments
 (0)