1 6 package tests.jfun.parsec.mssql; 7 8 13 public final class FunctionCall implements Expression { 14 15 18 public int getPrecedence() { 19 return Precedences.function_call(); 20 } 21 22 25 public void acceptVisitor(ExpressionVisitor v) { 26 v.visitFunctionCall(name, args); 27 } 28 private final QualifiedName name; 29 private final Expression[] args; 30 31 35 FunctionCall(final QualifiedName name, final Expression[] args) { 36 this.name = name; 37 this.args = args; 38 } 39 public String toString(){ 40 final StringBuffer buf = new StringBuffer (name.toString()); 41 buf.append('('); 42 if(args.length >= 1) 43 buf.append(args[0]); 44 for(int i=1; i<args.length; i++) 45 buf.append(", ").append(args[i]); 46 buf.append(')'); 47 return buf.toString(); 48 } 49 } 50 | Popular Tags |