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

Method cstNode

gapil/bapi/encode.go:2118–2127  ·  view source on GitHub ↗
(n cst.Node)

Source from the content-addressed store, hash-verified

2116}
2117
2118func (e *encoder) cstNode(n cst.Node) (out *CSTNode) {
2119 switch n := n.(type) {
2120 case *cst.Branch:
2121 return &CSTNode{Ty: &CSTNode_Branch{e.cstBranch(n)}}
2122 case *cst.Leaf:
2123 return &CSTNode{Ty: &CSTNode_Leaf{e.cstLeaf(n)}}
2124 default:
2125 panic(fmt.Errorf("Unhandled CST Node: %T", n))
2126 }
2127}
2128
2129func (e *encoder) cstSeparator(n cst.Separator) *CSTSeparator {
2130 if len(n) == 0 {

Callers 1

mappingsMethod · 0.95

Calls 2

cstBranchMethod · 0.95
cstLeafMethod · 0.95

Tested by

no test coverage detected