MCPcopy Create free account
hub / github.com/brimdata/super / arrayToExpr

Function arrayToExpr

compiler/semantic/sem/expr.go:526–536  ·  view source on GitHub ↗
(loc ast.Node, typ *super.TypeArray, bytes scode.Bytes)

Source from the content-addressed store, hash-verified

524}
525
526func arrayToExpr(loc ast.Node, typ *super.TypeArray, bytes scode.Bytes) Expr {
527 var elems []ArrayElem
528 inner := super.InnerType(typ)
529 for it := bytes.Iter(); !it.Done(); {
530 elems = append(elems, &ExprElem{Node: loc, Expr: valueToExpr(loc, inner, it.Next())})
531 }
532 return &ArrayExpr{
533 Node: loc,
534 Elems: elems,
535 }
536}
537
538func setToExpr(loc ast.Node, typ *super.TypeSet, bytes scode.Bytes) Expr {
539 var elems []ArrayElem

Callers 1

valueToExprFunction · 0.85

Calls 5

InnerTypeFunction · 0.92
valueToExprFunction · 0.85
IterMethod · 0.80
DoneMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected