-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The parser works in three stages: 1. Lex the TOML. 2. Parse the TOML values (e.g. parse integers to int64) 3. Decode that in to the destination type (struct or map). Reporting good errors with position info from stage 1 and 2 was already possible, but not from stage 3. In some cases we only know if something is wrong in stage 3, for example trying to parse "200" in to an int8: we need the type info for that, and we can't do that in stage 1 or 2 since we don't have it. This copies a bit more data, and is slightly slower, but only by about 1% so it's acceptable.
- Loading branch information
Showing
6 changed files
with
348 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.