Summary
Some key names retain their quote characters in the AST name property. For example, table ['a'] produces a node with name = "'a'" instead of name = "a". This affects both single-quoted and double-quoted keys, as well as keys with special characters.
Affected toml-test cases (6)
Found via toml-lang/toml-test compliance suite:
valid/table/with-literal-string.toml — single-quoted table names keep quotes
valid/table/with-single-quotes.toml — single-quoted table names
valid/table/empty-name.toml — empty string keys [""]
valid/multibyte.toml — Unicode key keeps quotes
valid/spec-1.0.0/table-3.toml — Unicode key with quotes
valid/key/space.toml — keys with whitespace
Related: #32
Summary
Some key names retain their quote characters in the AST
nameproperty. For example, table['a']produces a node withname = "'a'"instead ofname = "a". This affects both single-quoted and double-quoted keys, as well as keys with special characters.Affected toml-test cases (6)
Found via
toml-lang/toml-testcompliance suite:valid/table/with-literal-string.toml— single-quoted table names keep quotesvalid/table/with-single-quotes.toml— single-quoted table namesvalid/table/empty-name.toml— empty string keys[""]valid/multibyte.toml— Unicode key keeps quotesvalid/spec-1.0.0/table-3.toml— Unicode key with quotesvalid/key/space.toml— keys with whitespaceRelated: #32