DirectiveOrder.Runs.step: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/layout/directive_order.bend as DirectiveOrder Lines 120-142 of bend-lint-rules@0.2.0.0/layout/directive_order.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/layout/directive_order.bend&start_line=120&end_line=142 import Base import bend-lint-rules@0.2.0.0/lib/linter/directives.bend as Directives # The stacks, with a comment read: a directive on its own line, `key`, stacks on the one on the line before it. def Runs.step( key: Maybe<&2, String>, comment: Directives.Comment, path: String, runs: Runs ) -> Runs: match key comment runs: case Some{ k } Directives.Comment{b, e, +l, False{}, body} Runs{Some{Run{rb, re, +rl, rk, rs, slots}}, out}: Runs.extend( U32.is_eq(l, (rl + 1: U32)), Run{rb, re, rl, rk, rs, slots}, Directives.Comment{b, e, l, False{}, body}, k, path, out ) case Some{+k} Directives.Comment{b, e, l, False{}, body} Runs{None{}, out}: Runs{Some{Run.first(k, b, e, l, body)}, out} case _ _ _: runs 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/directive_order.bend&name=Run https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/directive_order.bend&name=Run.first https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/directive_order.bend&name=Runs https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/directive_order.bend&name=Runs.extend https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/linter/directives.bend&name=Comment