Add creates an association between the AST and CST nodes.
(a Node, c cst.Node)
| 33 | |
| 34 | // Add creates an association between the AST and CST nodes. |
| 35 | func (m *Mappings) Add(a Node, c cst.Node) { |
| 36 | m.init() |
| 37 | m.ASTToCST[a] = c |
| 38 | m.CSTToAST[c] = a |
| 39 | } |
| 40 | |
| 41 | // CST returns the CST node for the given AST node. |
| 42 | func (m *Mappings) CST(ast Node) cst.Node { |