Yaml.Yaml.scalar: def of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/src/yaml.bend as Yaml Lines 610-626 of bend-kube-runtime@0.2.0.0/src/yaml.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&start_line=610&end_line=626 import Base import bend-kube-runtime@0.2.0.0/src/json.bend as J # A scalar or flow value; an alias (*name) or a tag (!!str x) first. def Yaml.scalar(+s: String) -> J.Json: match s: case SCon{'*', t}: J.JStr{SCon{Chr{0}, SCon{'*', t}}} case SCon{'!', t}: Yaml.tagged(Yaml.split_word(t)) case SCon{'"', t}: Yaml.json_or(J.Json.parse(s), s) case SCon{'\'', t}: J.JStr{Yaml.unsingle(Yaml.strip_ends(s))} case SCon{'[', t}: Yaml.json_or(J.Json.parse(Yaml.flow(s)), s) case SCon{'{', t}: Yaml.json_or(J.Json.parse(Yaml.flow(s)), s) case x: Yaml.plain(x) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/json.bend&name=Json.parse https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.flow https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.json_or https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.plain https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.split_word https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.strip_ends https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.tagged https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/yaml.bend&name=Yaml.unsingle