Esempio n. 1
0
        /// <summary>
        /// Fills the given parent rule with rules given by the tokens.
        /// </summary>
        void FillRules(CssGroupingRule group)
        {
            var token = _tokenizer.Get();

            while (token.IsNot(CssTokenType.Eof, CssTokenType.CurlyBracketClose))
            {
                var rule = CreateRule(token);
                group.AddRule(rule);
                token = _tokenizer.Get();
            }
        }
Esempio n. 2
0
        void FillRules(CssGroupingRule group)
        {
            var token = NextToken();

            CollectTrivia(ref token);

            while (token.IsNot(CssTokenType.Eof, CssTokenType.CurlyBracketClose))
            {
                CreateNewNode();
                var rule = CreateRule(token);
                token = NextToken();
                CollectTrivia(ref token);
                group.AddRule(CloseNode(rule));
            }
        }