`name(Args) when Guard` — the clause text up to the `->`.
(clause: SyntaxNode, source: string)
| 126 | |
| 127 | /** `name(Args) when Guard` — the clause text up to the `->`. */ |
| 128 | function clauseHeader(clause: SyntaxNode, source: string): string | undefined { |
| 129 | const body = getChildByField(clause, 'body'); |
| 130 | const end = body ? body.startIndex : clause.endIndex; |
| 131 | return collapseWs(source.substring(clause.startIndex, end)) || undefined; |
| 132 | } |
| 133 | |
| 134 | function handleFunDecl(node: SyntaxNode, ctx: ExtractorContext): boolean { |
| 135 | const clauses = node.namedChildren.filter((c) => c.type === 'function_clause'); |
no test coverage detected