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

Method IsVariadic

go/parser/ast/expr.go:87–90  ·  view source on GitHub ↗

IsVariadic returns true if the expression is a list "[...]".

()

Source from the content-addressed store, hash-verified

85
86// IsVariadic returns true if the expression is a list "[...]".
87func (e Expr) IsVariadic() bool {
88 return !e.IsLiteral() && !e.IsFuncall() && len(e.sexp) > 0 &&
89 (e.sexp[0].token == '[' || e.sexp[0].token == '(')
90}
91
92// IsUnary returns true if e is a binary expression.
93func (e Expr) IsUnary() bool {

Callers 7

IsUnaryMethod · 0.95
IsBinaryMethod · 0.95
StringMethod · 0.95
TestUnaryFunction · 0.80
TestBinaryFunction · 0.80
TestVariadicFunction · 0.80
TestFuncallFunction · 0.80

Calls 2

IsLiteralMethod · 0.95
IsFuncallMethod · 0.95

Tested by 4

TestUnaryFunction · 0.64
TestBinaryFunction · 0.64
TestVariadicFunction · 0.64
TestFuncallFunction · 0.64