def name.keep
import ezx@1.11.0.0/src/ez/target.bend as Targetimport Base
73# one char of a name, with the rest of the name still to be asked about.
74# The rest arrives as a thunk, so a char that ends the name ends the walk.
75def name.keep(mark: Mark, rest: Unit -> Bool) -> Bool:
76 match mark:
77 case Word{}:
78 rest(Unit{})
79 case Dot{}:
80 rest(Unit{})
81 case Slash{}:
82 False{}
83 case Tilde{}:
84 False{}
85 case Other{}:
86 False{}