@@ -114,16 +114,12 @@ private static function parseAtRule(ParserState $oParserState) {
114
114
if (!$ oParserState ->comes ('; ' )) {
115
115
$ sMediaQuery = trim ($ oParserState ->consumeUntil (array ('; ' , ParserState::EOF )));
116
116
}
117
- if (!$ oParserState ->isEnd ()) {
118
- $ oParserState ->consume ('; ' );
119
- }
117
+ $ oParserState ->consumeUntil (array ('; ' , ParserState::EOF ), true , true );
120
118
return new Import ($ oLocation , $ sMediaQuery , $ iIdentifierLineNum );
121
119
} else if ($ sIdentifier === 'charset ' ) {
122
120
$ sCharset = CSSString::parse ($ oParserState );
123
121
$ oParserState ->consumeWhiteSpace ();
124
- if (!$ oParserState ->isEnd ()) {
125
- $ oParserState ->consume ('; ' );
126
- }
122
+ $ oParserState ->consumeUntil (array ('; ' , ParserState::EOF ), true , true );
127
123
return new Charset ($ sCharset , $ iIdentifierLineNum );
128
124
} else if (self ::identifierIs ($ sIdentifier , 'keyframes ' )) {
129
125
$ oResult = new KeyFrame ($ iIdentifierLineNum );
@@ -141,9 +137,7 @@ private static function parseAtRule(ParserState $oParserState) {
141
137
$ sPrefix = $ mUrl ;
142
138
$ mUrl = Value::parsePrimitiveValue ($ oParserState );
143
139
}
144
- if (!$ oParserState ->isEnd ()) {
145
- $ oParserState ->consume ('; ' );
146
- }
140
+ $ oParserState ->consumeUntil (array ('; ' , ParserState::EOF ), true , true );
147
141
if ($ sPrefix !== null && !is_string ($ sPrefix )) {
148
142
throw new UnexpectedTokenException ('Wrong namespace prefix ' , $ sPrefix , 'custom ' , $ iIdentifierLineNum );
149
143
}
0 commit comments