Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -51,6 +51,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
failure alike. `Valid(data)` reports whether a document parses, nil on
|
||||
success and the parse error on failure, the library call the `-validate`
|
||||
mode of interpres-decode is built on.
|
||||
- `SyntaxError` carries the byte `Offset` the scan stopped at and the 1-based
|
||||
`Column` on the line, beside the line it always had, and `SourceLine(src)`
|
||||
renders that line with a caret under the position, for messages shown under
|
||||
the input. An input that is not valid UTF-8 names the offset of the first
|
||||
invalid byte in its message. The new fields are additive: a `SyntaxError`
|
||||
built from a line and a message alone is unchanged.
|
||||
- `Decoder.UseNumber()` decodes the integers and floats of the document into
|
||||
`Number`, which carries the literal the document wrote, so `0x1f`, `1_000`,
|
||||
`+1.0` and `inf` survive a round trip with their spelling instead of the
|
||||
|
||||
Reference in New Issue
Block a user