(node: SyntaxNode, ctx: ExtractorContext)
| 196 | } |
| 197 | |
| 198 | function handleBehaviour(node: SyntaxNode, ctx: ExtractorContext): boolean { |
| 199 | const nameNode = getChildByField(node, 'name'); |
| 200 | const parentId = ctx.nodeStack[ctx.nodeStack.length - 1]; |
| 201 | if (nameNode && parentId) { |
| 202 | // `-behaviour(x)` implements x's callback contract. Resolves when the |
| 203 | // behaviour module is in the repo; OTP behaviours (gen_server, …) simply |
| 204 | // stay unresolved. |
| 205 | ctx.addUnresolvedReference({ |
| 206 | fromNodeId: parentId, |
| 207 | referenceName: atomText(nameNode, ctx.source), |
| 208 | referenceKind: 'implements', |
| 209 | line: node.startPosition.row + 1, |
| 210 | column: node.startPosition.column, |
| 211 | }); |
| 212 | } |
| 213 | return true; |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * OTP application resource file (`<app>.app.src` / `<app>.app`): a single |
no test coverage detected