Ejemplo n.º 1
0
        public override Node VisitStylesheet([NotNull] StylesheetContext context)
        {
            var stylesheet = new StylesheetNode(context.Start, context.LABEL().GetText());

            foreach (PageContext page in context.page())
            {
                stylesheet.AddChild(Visit(page));
            }

            return(stylesheet);
        }
Ejemplo n.º 2
0
        public override QLSNode VisitStylesheet(StylesheetContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("Context can't be null.");
            }

            string id      = context.ID().GetText();
            var    styles  = VisitDefaults(context.defaults());
            var    qlsNode = new QLSStructuralNode(Location.FromContext(context), QLSNodeType.Stylesheet, id, styles);

            foreach (PageContext pageContext in context.page())
            {
                qlsNode.AddNode(VisitPage(pageContext));
            }

            return(qlsNode);
        }