-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/toml: add support for inline tables
Decoding a field is moved to a method, as now it is used for both top-level key-values as well as key-values inside an inline table. We will soon use this method for tables with headers too. While here, add more edge cases for duplicate keys as well as test cases where the keys are different but in subtle ways. And also ensure that go-toml's Unmarshal errors on all the cases where our decoder errors, primarily to ensure that we are identical in terms of failing on duplicate keys. This test validation with go-toml might need to be tweaked if or when our decoder ever starts giving any CUE-specific errors. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: Idfb92615c2bbdfd2cdc7fe299990438bdf4eb009 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194758 Reviewed-by: Roger Peppe <rogpeppe@gmail.com> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
- Loading branch information
Showing
2 changed files
with
156 additions
and
48 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