yamleam/scalar
Plain scalar resolution.
Converts the verbatim text of a plain (unquoted) scalar into a typed
YamlNode according to YAML 1.2 resolution rules. Quoted scalars are
always strings and bypass this layer entirely.
Resolution priority (first match wins):
- Empty / “null” / “Null” / “NULL” / “~” → YamlNull
- “true” / “True” / “TRUE” → YamlBool(True)
- “false” / “False” / “FALSE” → YamlBool(False)
- Decimal integer (optional sign) → YamlInt
- Decimal float (optional sign, exponent) → YamlFloat
- Otherwise → YamlString
yamleam v0.1 explicitly does NOT recognize:
- YAML 1.1 boolean variants (“yes”, “no”, “on”, “off”)
- Hex / octal / binary integers
- Infinity / NaN Use double-quoted strings if you need any of those literally.
Values
pub fn resolve(text: String) -> node.YamlNode