MCPcopy Index your code
hub / github.com/sql-machine-learning/sqlflow / NewFuncall

Function NewFuncall

go/parser/ast/expr.go:164–173  ·  view source on GitHub ↗

NewFuncall returns an expression representing a function call.

(token int, op string, oprd ExprList)

Source from the content-addressed store, hash-verified

162
163// NewFuncall returns an expression representing a function call.
164func NewFuncall(token int, op string, oprd ExprList) (*Expr, error) {
165 fn, e := NewLiteral(token, op)
166 if e != nil {
167 return nil, e
168 }
169 return &Expr{
170 sexp: append(ExprList{fn}, oprd...),
171 funcall: true,
172 }, nil
173}
174
175func (e *Expr) String() string {
176 if !e.IsLiteral() { /* a compound expression */

Callers 2

TestSpecialTokenZeroFunction · 0.85
TestFuncallFunction · 0.85

Calls 1

NewLiteralFunction · 0.85

Tested by 2

TestSpecialTokenZeroFunction · 0.68
TestFuncallFunction · 0.68