private IEnumerable <Rule> sampleRules() { yield return(new Rule(new Selector("p"), DeclarationSet.Create( new Declaration("color", "red"), new Declaration("font-weight", "bold")))); yield return(new Rule(new Selector("p a"), DeclarationSet.Create( new Declaration("font-size", "12px")))); }
public override Object Visit(DeclarationSet node, Object obj) { for (int i = 0; i < node.Count; i++) { node.GetDeclarationElement(i).Accept(this, obj); } return(null); }
public override Object Visit(DeclarationSet node, Object obj) { List <Statement> declarations = new List <Statement>(); for (int i = 0; i < node.Count; i++) { declarations.Add((Statement)node.GetDeclarationElement(i).Accept(this, obj)); } return(new DeclarationSet(node.FullName, declarations, node.Location));; }
public override object Visit(DeclarationSet node, object obj) { base.Visit(node, obj); if (node.Location == ((AstNode)obj).Location || found) { found = true; } return(this.table); }
public abstract Object Visit(DeclarationSet node, Object obj);