Ejemplo 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();
            }
        }
Ejemplo n.º 2
0
        private TextPosition FillRules(CssGroupingRule group)
        {
            var token = NextToken();
            CollectTrivia(ref token);

            while (token.IsNot(CssTokenType.EndOfFile, CssTokenType.CurlyBracketClose))
            {
                var rule = CreateRule(token);
                token = NextToken();
                CollectTrivia(ref token);
                group.Rules.Add(rule);
            }

            return token.Position;
        }