public CssNode ParseStyleRule(List <string> tokens, ref int index) { List <CssSelector> selectorList = ParseCssSelectorList(tokens, ref index); index++; List <PropertyRule> propertyRuleList = ParsePropertyRuleList(tokens, ref index); StyleRule rule = new StyleRule("rule"); rule.selectorList = selectorList; rule.propertyRuleList = propertyRuleList; return(rule); }
public CssNode Parse(List <string> tokens, int index) { StyleSheet styleSheet = new StyleSheet(); while (index < tokens.Count) { StyleRule rule = (StyleRule)ParseStyleRule(tokens, ref index); styleSheet.styleRules.Add(rule); index++; } return(styleSheet); }