Exemplo n.º 1
0
        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"))));
        }
Exemplo n.º 2
0
        public override Object Visit(DeclarationSet node, Object obj)
        {
            for (int i = 0; i < node.Count; i++)
            {
                node.GetDeclarationElement(i).Accept(this, obj);
            }

            return(null);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 5
0
 public abstract Object Visit(DeclarationSet node, Object obj);