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

Method astSwitch

gapil/bapi/encode.go:2053–2063  ·  view source on GitHub ↗
(n *ast.Switch)

Source from the content-addressed store, hash-verified

2051}
2052
2053func (e *encoder) astSwitch(n *ast.Switch) (outID uint64) {
2054 e.build(&e.instances.AstSwitch, e.maps.ASTSwitch, n, &outID, func() *ASTSwitch {
2055 p := &ASTSwitch{
2056 Value: e.astNode(n.Value),
2057 Default: e.astDefault(n.Default),
2058 }
2059 foreach(n.Cases, e.astCase, &p.Cases)
2060 return p
2061 })
2062 return
2063}
2064
2065func (e *encoder) astUnaryOp(n *ast.UnaryOp) (outID uint64) {
2066 e.build(&e.instances.AstUnaryOp, e.maps.ASTUnaryOp, n, &outID, func() *ASTUnaryOp {

Callers 3

select_Method · 0.95
switch_Method · 0.95
astNodeMethod · 0.95

Calls 4

buildMethod · 0.95
astNodeMethod · 0.95
astDefaultMethod · 0.95
foreachFunction · 0.85

Tested by

no test coverage detected