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

Function setToExpr

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

Source from the content-addressed store, hash-verified

536}
537
538func setToExpr(loc ast.Node, typ *super.TypeSet, bytes scode.Bytes) Expr {
539 var elems []ArrayElem
540 inner := super.InnerType(typ)
541
542 for it := bytes.Iter(); !it.Done(); {
543 elems = append(elems, &ExprElem{Node: loc, Expr: valueToExpr(loc, inner, it.Next())})
544 }
545 return &SetExpr{
546 Node: loc,
547 Elems: elems,
548 }
549}
550
551func unionToExpr(loc ast.Node, typ *super.TypeUnion, bytes scode.Bytes) Expr {
552 innerType, innerBytes := typ.Untag(bytes)

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