def places.keep
import bend-lint-rules@0.2.0.0/lib/text/main.bend as BendLintRulesimport Base
357# The places found in the file at `path`, by key, onto `out`.
358def places.keep(
359 located: List<&2, Located>,
360 +path: String,
361 out: Map<&2, Position>
362) -> Map<&2, Position>:
363 match located:
364 case Nil{}:
365 out
366 case Con{Located{offset, at}, rest}:
367 places.keep(rest, path, Map.set(&2, Position, out, Place.key(path, offset), at))