Rewalk.mark: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk Lines 190-205 of bolt@1.27.0.0/src/rules/pedantic/rewalk.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&start_line=190&end_line=205 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 import bolt@1.27.0.0/src/rules/calls.bend as Calls import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy # calls that sit in a narrow accessor's collection argument def mark(nn: Tree.Node) -> List<&2, Pos>: match nn: case Tree.NCons{Tree.Leaf{Lex.Tok{k, +t, l, c}}, Tree.NCons{Tree.Group{Lex.Tok{_, +o, _, _}, +kids, _}, rest}}: +here = Lazy.stop(List<&2, Pos>, Bool.not(String.eq(o, "(")), [], _u => mark_slot(slot_of(t), Calls.args(kids))) List.concat(&2, Pos, [here, mark(kids), mark(rest)]) case Tree.NCons{Tree.Group{open, +kids, close}, rest}: List.concat(&2, Pos, [mark(kids), mark(rest)]) case Tree.NCons{Tree.Stmt{Tree.SCase{}, +kids, body}, rest}: List.concat(&2, Pos, [mark(kids), mark(rest)]) case Tree.NCons{Tree.Stmt{kind, +kids, body}, rest}: List.concat(&2, Pos, [mark(kids), mark(body), mark(rest)]) case Tree.NCons{h, rest}: mark(rest) case other: Nil{} Uses (12): 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.concat 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/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/rewalk.bend&name=Pos https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=mark_slot https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=slot_of 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 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=StmtKind