def style.number.present
gralha-svg-render@0.1.0.1 · svg.bend:1077
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
1077
1078
1079def style.number.present(found: Maybe<&2, String>, +parent: F32, +initial: F32, parse: String -> F32) -> F32:
1080 match found:
1081 case None{}: parent
1082 case Some{v}:
1083 +vv = v
1084 +k = style.keyword(vv)
1085 U.choose(F32, U32.is_eq(k, 1) || U32.is_eq(k, 3), parent,
1086 U.choose(F32, U32.is_eq(k, 2), initial, parse(vv)))