Skip to content

Commit 3f9139b

Browse files
authored
toml: allow dotted key lengths > 2 within nested arrays of arrays (#26145)
1 parent 15368a3 commit 3f9139b

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

‎vlib/toml/parser/parser.v‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -927,11 +927,6 @@ pub fn (mut p Parser) double_array_of_tables(mut table map[string]ast.Value) ! {
927927

928928
p.ignore_while(all_formatting)
929929

930-
if dotted_key.len != 2 {
931-
return error(@MOD + '.' + @STRUCT + '.' + @FN +
932-
' nested array of tables does not support more than 2 levels. (excerpt): "...${p.excerpt()}..."')
933-
}
934-
935930
p.check_explicitly_declared(dotted_key)!
936931

937932
first := DottedKey([dotted_key[0]]) // The array that holds the entries

‎vlib/toml/tests/toml_lang_test.v‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const valid_exceptions = [
2121
'string/escapes.toml',
2222
'string/multiline-quotes.toml',
2323
'table/array-implicit-and-explicit-after.toml',
24-
'table/array-within-dotted.toml',
2524
]
2625
// NOTE: entries in this list are tests of invalid TOML that should have the parser fail, but currently does not.
2726
const invalid_exceptions = [

0 commit comments

Comments
 (0)