Skip to content

🚀 [Feature]: Support core-schema integer and float forms (octal, hex, .inf, .nan) #26

@MariusStorhaug

Description

YAML 1.2.2 core schema recognises integer and float forms beyond plain base-10. The current parser only resolves base-10 ints and standard floats.

Request

Recognise the full core schema scalar resolution regex set:

Pattern Type
0o [0-7]+ int (octal)
0x [0-9a-fA-F]+ int (hex)
[-+]? \.inf / \.Inf / \.INF float (infinity)
\.nan / \.NaN / \.NAN float (NaN)

ConvertTo-Yaml should round-trip:

  • [double]::PositiveInfinity.inf
  • [double]::NegativeInfinity-.inf
  • [double]::NaN.nan

Integers should emit as base-10 (the canonical form per the spec).

Spec examples covered

  • Example 2.19 — Integers
  • Example 2.20 — Floating Point

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions