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); } }
private 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; }