Calls.type_head.go: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/calls.bend as Calls Lines 216-232 of bolt@1.27.0.0/src/rules/calls.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/calls.bend&start_line=216&end_line=232 import Base import bolt@1.27.0.0/src/syntax/tree.bend as Tree # the head of a parameter's type: the first capitalized name after the # colon, "" for none; hit: a name before pp was it, so the search stops there def type_head.go(pp: Tree.Node, +after: Bool, hit: Maybe<&2, String>) -> String: match pp: case Tree.NCons{+h, rest}: match hit: case Some{s}: s case None{}: type_head.go(rest, Bool.or(after, kind.leaf(~kind.colon, h)), Bool.pick(Maybe<&2, String>, Bool.and(after, kind.leaf(~kind.upper, h)), Some{leaf.text(h)}, None{})) case other: match hit: case Some{s}: s case None{}: "" Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=kind.colon https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=kind.leaf https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=kind.upper https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=leaf.text https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node