def as.number
import yaml-for-bend@0.1.1.0/compose.bend as Composeimport Base
import yaml-for-bend@0.1.1.0/parse.bend as P
import yaml-for-bend@0.1.1.0/core.bend as C
293# Whether a scalar's text is read as a number: plain without a tag, or
294# tagged !!int or !!float.
295def as.number(t: P.Tag, +plain: Bool) -> Bool:
296 match t:
297 case P.NoTag{}:
298 plain
299 case P.Tag{+n}:
300 Bool.or(String.eq(n, C.yaml.tag("int")), String.eq(n, C.yaml.tag("float")))