toml-node icon indicating copy to clipboard operation
toml-node copied to clipboard

Nested table keys not supported

Open datatypevoid opened this issue 5 years ago • 1 comments

To use an example from the TOML README, specifying a nested table as a key using dot syntax like this fails:

[dog."tater.man"]
  type.name = "pug"

> Error at line 2 column 7:
> Expected "=", [ \t] or [A-Za-z0-9_\-] but "." found.

This was run via the browser tool

datatypevoid avatar Nov 20 '18 00:11 datatypevoid

Dotted keys don't seem to work either.

Dotted keys example from toml spec...

name = "Orange"
physical.color = "orange"
physical.shape = "round"

Throws the following error...

Uncaught [SyntaxError: Expected "=", [ \t] or [A-Za-z0-9_\-] but "." found.] {
  message: 'Expected "=", [ \\t] or [A-Za-z0-9_\\-] but "." found.',
  expected: [
    { type: 'literal', value: '=', description: '"="' },
    { type: 'class', value: '[ \\t]', description: '[ \\t]' },
    {
      type: 'class',
      value: '[A-Za-z0-9_\\-]',
      description: '[A-Za-z0-9_\\-]'
    }
  ],
  found: '.',
  offset: 24,
  line: 2,
  column: 9,
  name: 'SyntaxError'
}

Is this package no longer being maintained?

lfarrel6 avatar Nov 10 '20 17:11 lfarrel6