示例#1
0
        public void Visit(OrOperator node)
        {
            VisitBinary(node);

            ITerminalWrapper leftWrapper  = ReferenceTables.GetValue(node.Left);
            ITerminalWrapper rightWrapper = ReferenceTables.GetValue(node.Right);

            ReferenceTables.SetValue(node, ((dynamic)leftWrapper) | ((dynamic)rightWrapper));
        }
示例#2
0
        public void Visit(QuestionUnit node)
        {
            ReferenceTables.SetReference(node.Identifier, node.DataType);

            if (!ReferenceTables.ContainsReference(node.DataType))
            {
                var wrapper = _terminalWrapperFactory.CreateWrapper(node.DataType);
                node.Value = wrapper;
                ReferenceTables.SetValue(node.DataType, wrapper);
            }
        }
示例#3
0
        public void Visit(Expression node)
        {
            //if expression is literal
            if (node.Child == null)
            {
                throw new Exception("Expression should have one and only one child");
            }

            node.Child.Accept(this);

            ReferenceTables.SetValue(node, ReferenceTables.GetValue(node.Child));
        }
示例#4
0
 public void Visit(Text node)
 {
     ReferenceTables.SetValue(node, new TextWrapper(node));
 }
示例#5
0
 public void Visit(Yesno node)
 {
     ReferenceTables.SetValue(node, new YesnoWrapper(node));
 }
示例#6
0
 public void Visit(Number node)
 {
     ReferenceTables.SetValue(node, new NumberWrapper(node));
 }