public override Node ExitFunctionCall(Production node) { var fe = new FunctionCallElement(); fe.AcceptValues(GetChildValues(node)); node.AddValue(fe); return(node); }
public override Node ExitFunctionCallExpression(Production node) { var childValues = GetChildValues(node); var name = (string)childValues[0]; childValues.RemoveAt(0); var args = new ArgumentList(childValues); var funcCall = new FunctionCallElement(name, args); node.AddValue(funcCall); return(node); }
static void Main() { FunctionCallElement funccall = new FunctionCallElement(); VariableElement name = new VariableElement(); name.setText("functioncall"); funccall.setfunctioncallname(name); VariableElement name1 = new VariableElement(); VariableElement name2 = new VariableElement(); name1.setText("a"); name2.setText("b"); funccall.setparameters(name1); funccall.setparameters(name2); List<Element> s = funccall.getparameters(); Element e; e = (Element)funccall.getfunctioncallname(); }
public override Node ExitFunctionCallExpression(Production node) { IList childValues = GetChildValues(node); string name = (string)childValues[0]; childValues.RemoveAt(0); if (string.Equals(name, "if", StringComparison.OrdinalIgnoreCase)) { // TODO: Validate parameter count. ConditionalElement op = new ConditionalElement((ExpressionElement)childValues[0], (ExpressionElement)childValues[1], (ExpressionElement)childValues[2]); node.AddValue(op); return(node); } ArgumentList args = new ArgumentList(childValues); FunctionCallElement funcCall = new FunctionCallElement(name, args); node.AddValue(funcCall); return(node); }
public override void VisitFunctionCallElement(FunctionCallElement element) { VisitElement(element.getfunctioncallname()); Console.Write("("); List<Element> param = element.getparameters(); for (int i = 0; i < param.Count; i++) { VisitElement(param[i]); if (i < (param.Count - 1)) { Console.Write(","); } } Console.Write(");\n"); }
public abstract void VisitFunctionCallElement(FunctionCallElement element);
public override void VisitFunctionCallElement(FunctionCallElement element) { //throw new NotImplementedException(); }