`name(Args) when Guard` — the clause text up to the `->`.
(clause: SyntaxNode, source: string)
| 91 | |
| 92 | /** `name(Args) when Guard` — the clause text up to the `->`. */ |
| 93 | function clauseHeader(clause: SyntaxNode, source: string): string | undefined { |
| 94 | const body = getChildByField(clause, 'body'); |
| 95 | const end = body ? body.startIndex : clause.endIndex; |
| 96 | return collapseWs(source.substring(clause.startIndex, end)) || undefined; |
| 97 | } |
| 98 | |
| 99 | function handleFunDecl(node: SyntaxNode, ctx: ExtractorContext): boolean { |
| 100 | const clauses = node.namedChildren.filter((c) => c.type === 'function_clause'); |
no test coverage detected