def Runs.step
bend-lint-rules@0.2.0.0 · layout/directive_order.bend:120
import bend-lint-rules@0.2.0.0/layout/directive_order.bend as DirectiveOrder
import Base
import bend-lint-rules@0.2.0.0/lib/linter/directives.bend as Directives
120
121def Runs.step(
122 key: Maybe<&2, String>,
123 comment: Directives.Comment,
124 path: String,
125 runs: Runs
126) -> Runs:
127 match key comment runs:
128 case Some{
129 k
130 } Directives.Comment{b, e, +l, False{}, body} Runs{Some{Run{rb, re, +rl, rk, rs, slots}}, out}:
131 Runs.extend(
132 U32.is_eq(l, (rl + 1: U32)),
133 Run{rb, re, rl, rk, rs, slots},
134 Directives.Comment{b, e, l, False{}, body},
135 k,
136 path,
137 out
138 )
139 case Some{+k} Directives.Comment{b, e, l, False{}, body} Runs{None{}, out}:
140 Runs{Some{Run.first(k, b, e, l, body)}, out}
141 case _ _ _:
142 runs