Thunk.site.group: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/thunk.bend as Thunk Lines 77-97 of bolt@1.27.0.0/src/rules/suspicious/thunk.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/suspicious/thunk.bend&start_line=77&end_line=97 import Base import bolt@1.27.0.0/src/finding.bend as F import bolt@1.27.0.0/src/syntax/lex.bend as Lex import bolt@1.27.0.0/src/syntax/tree.bend as Tree # after the parameter, `=>`, the name and its `(` group: the finding when # they make a thunk of a self-call def site.group( kp: Lex.TokKind, +pp: String, +aa: String, +nm: String, +ll: U32, +cc: U32, r3: Tree.Node, +name: String, +path: String ) -> List<&2, F.Finding>: match r3: case Tree.NCons{Tree.Group{Lex.Tok{_ko, +o, _lo, _co}, kids, _cl}, after}: +lead = Bool.and(Lex.is_name(kp), Bool.not(reads(kids, pp))) Bool.pick(List<&2, F.Finding>, hit(lead, String.eq(aa, "=>"), String.eq(nm, name), String.eq(o, "("), ends(after)), [cite(ll, cc, name, path)], []) case _other: [] Uses (16): 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.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/thunk.bend&name=cite https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/thunk.bend&name=ends https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/thunk.bend&name=hit https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/thunk.bend&name=reads 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/lex.bend&name=TokKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=is_name https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node