Exemplo n.º 1
0
        public override QLSNode VisitQuestion(QuestionContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("Context can't be null.");
            }

            string id = context.ID().GetText();

            if (context.widgetspecification() != null)
            {
                var widgetSpecificaitonVisitor = new WidgetSpecificationVisitor();
                var specification = widgetSpecificaitonVisitor.VisitWidgetspecification(context.widgetspecification());

                var qlsNode = new QLSQuestionNode(Location.FromContext(context), id, new List <QLSStyle>()
                {
                    new QLSStyle(QValueType.Unknown, specification)
                });
                return(qlsNode);
            }
            else
            {
                var qlsNode = new QLSQuestionNode(Location.FromContext(context), id);
                return(qlsNode);
            }
        }
Exemplo n.º 2
0
        public void Visit(QLSQuestionNode node)
        {
            this._visitedNodes.Add(node);

            VisitChildren(node);
        }