Your TOML is rather convoluted, a more normal way to write it would be:
[a]
b = [{x = 1}]
y = 2
Or alternatively: a.b = [{x = 1}]
a.y = 2
Some parsers allow newlines in TOML inline tables, so you can do: a = {
b = [{x = 1}],
y = 2,
}
That's supposed to be in the next TOML standard, but that seems indefinitely stalled as the (only) maintainer has seemingly lost interest and there hasn't been any movement for a long time.
> Your TOML is rather convoluted, a more normal way to write it would be
Anecdata, granted, but I've seen a lot of TOML written exactly like the "convoluted" example, and none like your more spread out version.