-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/toml: support decoding keys named "_"
We can't blindly create an ast.Ident with such a name, as that then refers to the "top" identifier in CUE, which cannot be used as a label: foo: cannot use _ as label: We hadn't noticed this with other keys which need quoting such as "a-b" because sticking the unquoted string in ast.Ident.Name caused cue/format to quote the identifier correctly. It does not do this for "_" as it is a valid identifier - it just represents top, and not a literal string. Fixes #3350. Signed-off-by: Daniel Martí <[email protected]> Change-Id: If0f2c2fd6c0d984a7c6c30e4667ab8ed097aa17b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198819 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
12 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