MCPcopy Index your code
hub / github.com/google/mangle / StructCons

Function StructCons

ast/ast.go:356–359  ·  view source on GitHub ↗

StructCons constructs a struct, using pairs. Parts can only be accessed in transforms.

(label, val, rest *Constant)

Source from the content-addressed store, hash-verified

354
355// StructCons constructs a struct, using pairs. Parts can only be accessed in transforms.
356func StructCons(label, val, rest *Constant) Constant {
357 e := pair(PairShape, label, val)
358 return pair(StructShape, &e, rest)
359}
360
361// ListNil represents an empty list.
362var ListNil = Constant{ListShape, "", 0, nil, nil}

Callers 2

StructFunction · 0.85
TestHashFunction · 0.85

Calls 1

pairFunction · 0.70

Tested by 1

TestHashFunction · 0.68