@@ -114,16 +114,12 @@ private static function parseAtRule(ParserState $oParserState) {
114114 if (!$ oParserState ->comes ('; ' )) {
115115 $ sMediaQuery = trim ($ oParserState ->consumeUntil (array ('; ' , ParserState::EOF )));
116116 }
117- if (!$ oParserState ->isEnd ()) {
118- $ oParserState ->consume ('; ' );
119- }
117+ $ oParserState ->consumeUntil (array ('; ' , ParserState::EOF ), true , true );
120118 return new Import ($ oLocation , $ sMediaQuery , $ iIdentifierLineNum );
121119 } else if ($ sIdentifier === 'charset ' ) {
122120 $ sCharset = CSSString::parse ($ oParserState );
123121 $ oParserState ->consumeWhiteSpace ();
124- if (!$ oParserState ->isEnd ()) {
125- $ oParserState ->consume ('; ' );
126- }
122+ $ oParserState ->consumeUntil (array ('; ' , ParserState::EOF ), true , true );
127123 return new Charset ($ sCharset , $ iIdentifierLineNum );
128124 } else if (self ::identifierIs ($ sIdentifier , 'keyframes ' )) {
129125 $ oResult = new KeyFrame ($ iIdentifierLineNum );
@@ -141,9 +137,7 @@ private static function parseAtRule(ParserState $oParserState) {
141137 $ sPrefix = $ mUrl ;
142138 $ mUrl = Value::parsePrimitiveValue ($ oParserState );
143139 }
144- if (!$ oParserState ->isEnd ()) {
145- $ oParserState ->consume ('; ' );
146- }
140+ $ oParserState ->consumeUntil (array ('; ' , ParserState::EOF ), true , true );
147141 if ($ sPrefix !== null && !is_string ($ sPrefix )) {
148142 throw new UnexpectedTokenException ('Wrong namespace prefix ' , $ sPrefix , 'custom ' , $ iIdentifierLineNum );
149143 }
0 commit comments