MCPcopy Create free account
hub / github.com/google/gapid / switch_

Method switch_

gapil/bapi/encode.go:1439–1450  ·  view source on GitHub ↗
(n *semantic.Switch)

Source from the content-addressed store, hash-verified

1437}
1438
1439func (e *encoder) switch_(n *semantic.Switch) (outID uint64) {
1440 e.build(&e.instances.Switch, e.maps.Switch, n, &outID, func() *Switch {
1441 p := &Switch{
1442 Ast: e.astSwitch(n.AST),
1443 Value: e.expr(n.Value),
1444 Default: e.block(n.Default),
1445 }
1446 foreach(n.Cases, e.case_, &p.Cases)
1447 return p
1448 })
1449 return
1450}
1451
1452func (e *encoder) ty(n semantic.Type) *Type {
1453 if isNil(n) {

Callers 2

nodeMethod · 0.95
statMethod · 0.95

Calls 5

buildMethod · 0.95
astSwitchMethod · 0.95
exprMethod · 0.95
blockMethod · 0.95
foreachFunction · 0.85

Tested by

no test coverage detected