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)); }
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); } }
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)); }
public void Visit(Text node) { ReferenceTables.SetValue(node, new TextWrapper(node)); }
public void Visit(Yesno node) { ReferenceTables.SetValue(node, new YesnoWrapper(node)); }
public void Visit(Number node) { ReferenceTables.SetValue(node, new NumberWrapper(node)); }