fix CSSLint's parser-lib @document{}

This commit is contained in:
tophf 2015-07-15 17:17:24 +03:00
parent 5802cc4ae6
commit c2cb452783

View File

@ -2061,21 +2061,24 @@ Parser.prototype = function(){
col: token.startCol col: token.startCol
}); });
while(true) { var ok = true;
if (tokenStream.peek() == Tokens.PAGE_SYM){ while(ok) {
this._page(); switch (tokenStream.peek()) {
} else if (tokenStream.peek() == Tokens.FONT_FACE_SYM){ case Tokens.PAGE_SYM: this._page(); break;
this._font_face(); case Tokens.FONT_FACE_SYM: this._font_face(); break;
} else if (tokenStream.peek() == Tokens.VIEWPORT_SYM){ case Tokens.VIEWPORT_SYM: this._viewport(); break;
this._viewport(); case Tokens.MEDIA_SYM: this._media(); break;
} else if (tokenStream.peek() == Tokens.MEDIA_SYM){ case Tokens.KEYFRAMES_SYM: this._keyframes(); break;
this._media(); case Tokens.DOCUMENT_SYM: this._document(); break;
} else if (!this._ruleset()){ default:
break; if (!this._ruleset()) {
ok = false;
}
} }
} }
tokenStream.mustMatch(Tokens.RBRACE); tokenStream.mustMatch(Tokens.RBRACE);
token = tokenStream.token();
this._readWhitespace(); this._readWhitespace();
this.fire({ this.fire({
@ -3259,6 +3262,7 @@ Parser.prototype = function(){
this._readWhitespace(); this._readWhitespace();
tokenStream.mustMatch(Tokens.RBRACE); tokenStream.mustMatch(Tokens.RBRACE);
this._readWhitespace();
}, },