Skip to content

Commit 3e5bd7f

Browse files
committed
Rename SelectorRule to StyleRule to match CSSOM nomenclature.
1 parent a39b2c0 commit 3e5bd7f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

parser.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function parse(tokens) {
8383
case "WHITESPACE": break;
8484
case "AT-KEYWORD": push(new AtRule(token.value)) && switchto('at-rule'); break;
8585
case "{": parseerror("Attempt to open a curly-block at top-level.") && consumeASimpleBlock(token); break;
86-
default: push(new SelectorRule) && switchto('selector') && reprocess();
86+
default: push(new StyleRule) && switchto('selector') && reprocess();
8787
}
8888
break;
8989

@@ -108,7 +108,7 @@ function parse(tokens) {
108108
case "BADURL": parseerror("Use of BADSTRING or BADURL token in selector.") && switchto('next-block'); break;
109109
case "}": pop() && switchto(); break;
110110
case "AT-KEYWORD": push(new AtRule(token.value)) && switchto('at-rule'); break;
111-
default: push(new SelectorRule) && switchto('selector') && reprocess();
111+
default: push(new StyleRule) && switchto('selector') && reprocess();
112112
}
113113
break;
114114

@@ -297,18 +297,18 @@ AtRule.registry = {
297297
'region-style': 'rule'
298298
};
299299

300-
function SelectorRule() {
300+
function StyleRule() {
301301
this.selector = [];
302302
this.value = [];
303303
return this;
304304
}
305-
SelectorRule.prototype = new CSSParserRule;
306-
SelectorRule.prototype.ruleType = "SELECTOR-RULE";
307-
SelectorRule.prototype.appendSelector = function(val) {
305+
StyleRule.prototype = new CSSParserRule;
306+
StyleRule.prototype.ruleType = "SELECTOR-RULE";
307+
StyleRule.prototype.appendSelector = function(val) {
308308
this.selector.push(val);
309309
return this;
310310
}
311-
SelectorRule.prototype.toJSON = function() {
311+
StyleRule.prototype.toJSON = function() {
312312
return {type:'selector', selector:this.selector.map(function(e){return e.toJSON();}), value:this.value.map(function(e){return e.toJSON();})};
313313
}
314314

0 commit comments

Comments
 (0)