Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- §7.1 ABNF `unescaped-char`: supplementary scalars (`%x10000-10FFFF`) included explicitly.
- §13: option names and value tokens are concept handles; implementations MAY use language-idiomatic spellings or types.
- Appendix F.5: informative Java mapping section.
- Tests: decode fixtures for ambiguous leading-plus tokens, matching reference behavior.

### Changed

Expand Down
19 changes: 19 additions & 0 deletions tests/fixtures/decode/numbers.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,25 @@
"specSection": "4",
"note": "Exponent +00 results in the integer 5"
},
{
"name": "treats leading plus integer as string",
"input": "value: +1",
"expected": {
"value": "+1"
},
"specSection": "4",
"note": "The spec is silent on leading-plus tokens; the reference implementation treats them as strings"
},
{
"name": "treats leading plus numeric-looking tokens as strings",
"input": "values[3]: +1,+1.5,+1e2\nexponent: 1e+2",
"expected": {
"values": ["+1", "+1.5", "+1e2"],
"exponent": 100
},
"specSection": "4",
"note": "Reference behavior: exponent plus signs are numeric, but leading-plus tokens remain strings"
},
{
"name": "parses zero with exponent as number",
"input": "value: 0e1",
Expand Down