Skip to content

Nested arrays of tables misbehave #82

@bensmrs

Description

@bensmrs

Hi,

I’m having some problems with nested arrays of tables.
Arrays of tables are supported:

# Toml.Parser.from_string "foo=[{bar=42}]" |> Toml.Parser.unsafe |> Toml.Printer.string_of_table;;
- : string = "[[foo]]\nbar = 42\n"

However, adding one additional level of nesting generates invalid TOML:

# Toml.Parser.from_string "foo=[[{bar=42}]]" |> Toml.Parser.unsafe |> Toml.Printer.string_of_table;;
- : string = "foo = [[[]]\nbar = 42\n]\n"

The source stream is properly parsed, but the printer has trouble generating a meaningful output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions