fixup bc63ecca: unget only if matched

This commit is contained in:
tophf 2017-05-17 16:04:33 +03:00
parent af7a402bd3
commit b2ab3d45ad

View File

@ -2288,14 +2288,15 @@ Parser.prototype = function() {
value += tokenStream.token().value; value += tokenStream.token().value;
value += this._readWhitespace(); value += this._readWhitespace();
if (tokenStream.match([Tokens.IDENT]) if (tokenStream.match([Tokens.IDENT])) {
&& tokenStream.token().value.toLowerCase() == 'i') { if (tokenStream.token().value.toLowerCase() == 'i') {
value += tokenStream.token().value; value += tokenStream.token().value;
value += this._readWhitespace(); value += this._readWhitespace();
} else { } else {
tokenStream.unget(); tokenStream.unget();
} }
} }
}
tokenStream.mustMatch(Tokens.RBRACKET); tokenStream.mustMatch(Tokens.RBRACKET);