def path.follow

gralha-svg-render@0.1.0.1 · svg.bend:486

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

486# The command a bare number after `cmd` repeats: a move continues as a
487# line, a close as nothing (the parse ends), any other command as itself.
488def path.follow(+cmd: U32) -> U32:
489  U.choose(U32, U32.is_eq(cmd, 77), 76, U.choose(U32, U32.is_eq(cmd, 109), 108, U.choose(U32, U32.is_eq(upper(cmd), 90), 0, cmd)))

Uses (4)

Used by (1)