toml icon indicating copy to clipboard operation
toml copied to clipboard

Error messages for `value=[zzz]` are not helpful

Open epage opened this issue 3 years ago • 2 comments

While value=zzz provides a nice error message (unexpected z, expected quoted string), but not value=[zzz] (Expected 'newline' or '#') because of challenges with parsing optional trailing commas

epage avatar Jan 10 '22 17:01 epage

hi, the document says that I can do the following. However, the toml result has a issue of trailing comma. Does it relate to this github issue? Thanks. For instance,
doc["a"]["b"]["c"]["d1"] = value("hello1"); { d1 = "hello1" } doc["a"]["b"]["c"]["d2"] = value("hello2"); { d1 = "hello1" , d2 = "hello2" } image

stewartli avatar Jul 23 '23 07:07 stewartli

This issue is only about the quality of an error message in a case that is suppose to error. I would recommend creating a dedicated issue or discussion and include a full minimal reproduction case with actual output and expected so we can know how to help you.

epage avatar Jul 24 '23 12:07 epage