def scan.go
import ezx@1.11.0.0/src/pkg/pkg.bend as Pkgimport Base
276# the state once a line has been classified
277def scan.go(st: Head, stmt: Stmt) -> Head:
278 Head{head, mods, foreign} = st
279 match stmt:
280 case SNone{}:
281 Head{head, mods, foreign}
282 case SForeign{at}:
283 Head{head, mods, at <> foreign}
284 case SMod{spec}:
285 scan.mod(head, spec, mods, foreign)
286 case SBody{}:
287 Head{False{}, mods, foreign}