def lanes

bolt@1.27.0.0 · src/rules/pedantic/foreign.bend:43

import bolt@1.27.0.0/src/rules/pedantic/foreign.bend as Foreign
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

43# the lanes of a def's body: None unless it is a foreign def
44def lanes(body: Tree.Node) -> Maybe<&2, Lanes>:
45  match body:
46    case Tree.NCons{Tree.Stmt{Tree.SImport{}, kids, ib}, rest}:
47      +t = target(kids)
48      lanes.go(rest, String.ends_with(t, ".c\""), String.ends_with(t, ".js\""))
49    case other:
50      None{}

Uses (7)

Used by (1)