-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There were multiple issues, mostly resulting from toml.tableMap. This commit removes tableMap and detects conflicts when the table is created. A variant of this fix was proposed by @kezuwh in #15. Fixes #7 Fixes #18 Fixes #21
- Loading branch information
Showing
5 changed files
with
110 additions
and
85 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# unmarshal-arraytable-conflict-3.toml | ||
|
||
[[fruit]] | ||
name = "apple" | ||
variety = { name = "granny smith" } | ||
|
||
# conflicts with inline table above | ||
[[fruit.variety]] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# unmarshal-arraytable-nested-3.toml | ||
|
||
[[fruit]] | ||
variety = [{name = "red delicious"}, {name = "granny smith"}] | ||
|
||
[[fruit]] | ||
variety = [{name = "plantain"}] | ||
area = [{name = "phillippines"}] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# unmarshal-table-withinline.toml | ||
|
||
[tab1] | ||
tabarray = [{key = "1"}] | ||
|
||
[tab2] | ||
tabarray = [{key = "2"}] |