예제 #1
0
        void FillDeclarations(CssDeclarationRule rule, Func <String, CssProperty> createProperty)
        {
            var token = _tokenizer.Get();

            while (token.IsNot(CssTokenType.Eof, CssTokenType.CurlyBracketClose))
            {
                var property = CreateDeclarationWith(createProperty, ref token);

                if (property != null && property.HasValue)
                {
                    rule.SetProperty(property);
                }
            }
        }
예제 #2
0
        private CssDeclarationRule FillDeclarations(CssDeclarationRule rule)
        {
            var token = NextToken();

            CollectTrivia(ref token);

            while (token.IsNot(CssTokenType.EndOfFile, CssTokenType.CurlyBracketClose))
            {
                CreateDeclarationWith(rule, ref token);
                CollectTrivia(ref token);
            }

            return(rule);
        }
예제 #3
0
        TextPosition FillDeclarations(CssDeclarationRule rule, Func <String, CssProperty> createProperty)
        {
            var token = NextToken();

            CollectTrivia(ref token);

            while (token.IsNot(CssTokenType.EndOfFile, CssTokenType.CurlyBracketClose))
            {
                var property = CreateDeclarationWith(createProperty, ref token);

                if (property != null && property.HasValue)
                {
                    rule.SetProperty(property);
                }

                CollectTrivia(ref token);
            }

            return(token.Position);
        }