Calls.params.of.go: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/calls.bend as Calls Lines 139-160 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=139&end_line=160 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex import bolt@1.27.0.0/src/syntax/tree.bend as Tree # the kids of a signature's first `(` group: the parameters; hit: a group # before sig was one, so the search stops there def params.of.go(sig: Tree.Node, hit: Maybe<&2, Tree.Node>) -> Tree.Node: match sig: case Tree.NCons{Tree.Group{Lex.Tok{k, +o, l, c}, kids, close}, rest}: match hit: case Some{x}: x case None{}: params.of.go(rest, Bool.pick(Maybe<&2, Tree.Node>, String.eq(o, "("), Some{kids}, None{})) case Tree.NCons{h, rest}: match hit: case Some{x}: x case None{}: params.of.go(rest, None{}) case other: match hit: case Some{x}: x case None{}: Tree.NNil{} Uses (5): 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.eq https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node