def facts.of

bolt@1.27.0.0 · src/lint/plan.bend:389

import bolt@1.27.0.0/src/lint/plan.bend as Plan
import Base
import bolt@1.27.0.0/src/role.bend as Role

389# the facts (src/role.bend) of each file the World read, from its text, each
390# at its path resolved against the working directory (abs)
391def facts.of(gs: List<&2, Got>, +cwd: String) -> List<&2, Role.Fact>:
392  match gs:
393    case Nil{}:
394      Nil{}
395    case Con{Got{_path, None{}}, rest}:
396      facts.of(rest, cwd)
397    case Con{Got{path, Some{text}}, rest}:
398      Role.fact.text(abs(cwd, path), text) <> facts.of(rest, cwd)

Uses (7)

Used by (1)