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

Method mappings

gapil/bapi/encode.go:196–216  ·  view source on GitHub ↗
(m *semantic.Mappings)

Source from the content-addressed store, hash-verified

194}
195
196func (e *encoder) mappings(m *semantic.Mappings) *Mappings {
197 out := Mappings{}
198
199 for sem, asts := range m.SemanticToAST {
200 for _, ast := range asts {
201 out.SemToAst = append(out.SemToAst, &SemanticToAST{
202 Sem: e.node(sem),
203 Ast: e.astNode(ast),
204 })
205 }
206 }
207
208 for ast, cst := range m.AST.ASTToCST {
209 out.AstToCst = append(out.AstToCst, &ASTToCST{
210 Ast: e.astNode(ast),
211 Cst: e.cstNode(cst),
212 })
213 }
214
215 return &out
216}
217
218func (e *encoder) node(n semantic.Node) *Node {
219 switch n := n.(type) {

Callers 1

EncodeFunction · 0.95

Calls 3

nodeMethod · 0.95
astNodeMethod · 0.95
cstNodeMethod · 0.95

Tested by

no test coverage detected