|
@@ -244,7 +244,7 @@ export default class Parser {
|
244
|
244
|
selectors.push(selector);
|
245
|
245
|
}
|
246
|
246
|
|
247
|
|
- const children: (AST.Rule | AST.RuleSet)[] = [];
|
|
247
|
+ const children: (AST.Application | AST.Rule | AST.RuleSet)[] = [];
|
248
|
248
|
|
249
|
249
|
while (
|
250
|
250
|
[TokenTypes.PROPERTY, TokenTypes.LPAREN].includes(
|
|
@@ -262,9 +262,15 @@ export default class Parser {
|
262
|
262
|
|
263
|
263
|
children.push(new AST.Rule(property, value));
|
264
|
264
|
} else if (this.currentToken().type === TokenTypes.LPAREN) {
|
265
|
|
- const ruleSet = this.ruleSet(selectors);
|
266
|
|
- if (ruleSet instanceof ParserError) return ruleSet;
|
267
|
|
- children.push(ruleSet);
|
|
265
|
+ if (this.nextToken().type === TokenTypes.LITERAL) {
|
|
266
|
+ const ruleSet = this.ruleSet(selectors);
|
|
267
|
+ if (ruleSet instanceof ParserError) return ruleSet;
|
|
268
|
+ children.push(ruleSet);
|
|
269
|
+ } else {
|
|
270
|
+ const application = this.application();
|
|
271
|
+ if (application instanceof ParserError) return application;
|
|
272
|
+ children.push(application);
|
|
273
|
+ }
|
268
|
274
|
}
|
269
|
275
|
}
|
270
|
276
|
|