Fuel.calls: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/pedantic/fuel.bend as Fuel Lines 141-157 of bolt@1.27.0.0/src/rules/pedantic/fuel.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/pedantic/fuel.bend&start_line=141&end_line=157 import Base import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy 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 import bolt@1.27.0.0/src/rules/calls.bend as Calls # every call at any depth of a chain, but the def's own (self) def calls(nn: Tree.Node, +fs: List<&2, Fuel>, +self: String, +path: String) -> List<&2, F.Finding>: match nn: case Tree.NCons{Tree.Leaf{Lex.Tok{k, +t, l, c}}, Tree.NCons{Tree.Group{Lex.Tok{_, +o, _, _}, +kids, _}, rest}}: +more = List.concat(&2, F.Finding, [calls(kids, fs, self, path), calls(rest, fs, self, path)]) +hit = Bool.and(Bool.and(Lex.is_name(k), String.eq(o, "(")), Bool.not(String.eq(t, self))) Lazy.stop(List<&2, F.Finding>, Bool.not(hit), more, _u => List.append(&2, F.Finding, call(fs, t, Calls.args(kids), path), more)) case Tree.NCons{Tree.Group{open, kids, close}, rest}: List.concat(&2, F.Finding, [calls(kids, fs, self, path), calls(rest, fs, self, path)]) case Tree.NCons{Tree.Stmt{kind, kids, body}, rest}: List.concat(&2, F.Finding, [calls(kids, fs, self, path), calls(body, fs, self, path), calls(rest, fs, self, path)]) case Tree.NCons{h, rest}: calls(rest, fs, self, path) case other: Nil{} Uses (15): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.concat 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=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lazy/lazy.bend&name=stop https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/calls.bend&name=args https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/fuel.bend&name=Fuel https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/fuel.bend&name=call 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=is_name https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node