LeopoldArkham / Molten

[WIP] Molten - Style-preserving TOML parser.
Apache License 2.0
40 stars 8 forks source link

All AoT sibling names are formated like the first one #22

Closed LeopoldArkham closed 6 years ago

LeopoldArkham commented 6 years ago

The parser currently assumes that all sibling tables in an AoT have their names/keys formatted the same way. Since this may not be the case, we need to track the raw name of each of them, and use that in the display logic.

jeremydavis519 commented 6 years ago

The same problem exists with keys in general. We currently store the exact way in which each key is written and use it for both output and internal logic. The result is that foo, "foo", and 'foo' are all seen as separate and can all have different values within the same table. For the purpose of output, we still need to store the way in which each key is written, but we need to use a separate internal form for all of our other logic.

LeopoldArkham commented 6 years ago

Closed in WIP, Key now contains a normalized key field as well as a raw field for reproduction.