The declaration of a symbol, as a card source.
(ir: SemanticIR)
| 213 | |
| 214 | /** The declaration of a symbol, as a card source. */ |
| 215 | function sourceOfIr(ir: SemanticIR): CardSource { |
| 216 | const source: CardSource = { |
| 217 | name: ir.symbol.name, |
| 218 | filePath: workspacePathOf(ir.symbol.uri), |
| 219 | line: toGraphLine((ir.symbol.selectionRange ?? ir.symbol.range).start.line), |
| 220 | }; |
| 221 | if (ir.symbol.qualifiedName !== undefined) { |
| 222 | source.qualifiedName = ir.symbol.qualifiedName; |
| 223 | } |
| 224 | return source; |
| 225 | } |
| 226 | |
| 227 | function sourceOfNeighbour(entry: NeighbourFact): CardSource { |
| 228 | const source: CardSource = { name: entry.name }; |
no test coverage detected