diff --git a/.github/workflows/NodeCI.yml b/.github/workflows/NodeCI.yml index 7b31a86..50fabba 100644 --- a/.github/workflows/NodeCI.yml +++ b/.github/workflows/NodeCI.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [12.x, 14.x, 16.x, 18.x, 20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} diff --git a/tests/fixtures/test-specs/BurntSushi-toml-test b/tests/fixtures/test-specs/BurntSushi-toml-test index 9767d20..23c30e9 160000 --- a/tests/fixtures/test-specs/BurntSushi-toml-test +++ b/tests/fixtures/test-specs/BurntSushi-toml-test @@ -1 +1 @@ -Subproject commit 9767d201b51ac9c50630f181828bcd922bf3e9e5 +Subproject commit 23c30e9eb082f690cff66dd2a67d484dbbf927e7 diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/double-comma-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/double-comma-1-output.json new file mode 100644 index 0000000..fcd01be --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/double-comma-1-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/double-comma-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/double-comma-2-output.json new file mode 100644 index 0000000..19a3b79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/double-comma-2-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/extend-defined-aot-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/extend-defined-aot-output.json new file mode 100644 index 0000000..574f51a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/extend-defined-aot-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/extending-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/extending-table-output.json new file mode 100644 index 0000000..af02897 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/extending-table-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:5,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/missing-separator-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/missing-separator-1-output.json new file mode 100644 index 0000000..8bedac8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/missing-separator-1-output.json @@ -0,0 +1 @@ +"Expected comma (,) token@line:1,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/missing-separator-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/missing-separator-2-output.json new file mode 100644 index 0000000..88da9bb --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/missing-separator-2-output.json @@ -0,0 +1 @@ +"Expected comma (,) token@line:1,column:12" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-1-output.json new file mode 100644 index 0000000..127f639 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-1-output.json @@ -0,0 +1 @@ +"Unterminated array@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-2-output.json new file mode 100644 index 0000000..cf6c303 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-2-output.json @@ -0,0 +1 @@ +"Unspecified values are invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-3-output.json new file mode 100644 index 0000000..127f639 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-3-output.json @@ -0,0 +1 @@ +"Unterminated array@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-4-output.json new file mode 100644 index 0000000..dc0dc79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-4-output.json @@ -0,0 +1 @@ +"Unterminated inline table@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-5-output.json new file mode 100644 index 0000000..127f639 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-5-output.json @@ -0,0 +1 @@ +"Unterminated array@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-6-output.json new file mode 100644 index 0000000..dc0dc79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-6-output.json @@ -0,0 +1 @@ +"Unterminated inline table@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-7-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-7-output.json new file mode 100644 index 0000000..127f639 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-7-output.json @@ -0,0 +1 @@ +"Unterminated array@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-8-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-8-output.json new file mode 100644 index 0000000..cf6c303 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-8-output.json @@ -0,0 +1 @@ +"Unspecified values are invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-table-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-table-1-output.json new file mode 100644 index 0000000..dc0dc79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-table-1-output.json @@ -0,0 +1 @@ +"Unterminated inline table@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-table-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-table-2-output.json new file mode 100644 index 0000000..dc0dc79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-close-table-2-output.json @@ -0,0 +1 @@ +"Unterminated inline table@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-1-output.json new file mode 100644 index 0000000..a016b33 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-1-output.json @@ -0,0 +1 @@ +"Expected comma (,) token@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-2-output.json new file mode 100644 index 0000000..1905331 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-2-output.json @@ -0,0 +1 @@ +"Expected comma (,) token@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-3-output.json new file mode 100644 index 0000000..127f639 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/no-comma-3-output.json @@ -0,0 +1 @@ +"Unterminated array@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/only-comma-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/only-comma-1-output.json new file mode 100644 index 0000000..9e9dd5c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/only-comma-1-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/only-comma-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/only-comma-2-output.json new file mode 100644 index 0000000..9e9dd5c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/only-comma-2-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/tables-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/tables-1-output.json new file mode 100644 index 0000000..47045cd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/tables-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/tables-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/tables-2-output.json new file mode 100644 index 0000000..fe7dca3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/tables-2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:9,column:9" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-array-entries-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/text-after-array-entries-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-array-entries-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/text-after-array-entries-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-before-array-separator-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/text-before-array-separator-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-before-array-separator-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/text-before-array-separator-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-in-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/text-in-array-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-in-array-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array/text-in-array-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-no-secs-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-false-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-no-secs-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-false-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-false-with-extra-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-false-with-extra-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-false-with-extra-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-true-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-true-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-true-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-true-with-extra-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-true-with-extra-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/almost-true-with-extra-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/capitalized-false-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/capitalized-false-output.json new file mode 100644 index 0000000..e5bf925 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/capitalized-false-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:27" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/capitalized-true-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/capitalized-true-output.json new file mode 100644 index 0000000..e5bf925 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/capitalized-true-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:27" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/just-f-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/just-f-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/just-f-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/just-t-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/just-t-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/just-t-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-false-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-false-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-false-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-true-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-true-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/mixed-case-true-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/starting-same-false-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/starting-same-false-output.json new file mode 100644 index 0000000..5df9aaf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/starting-same-false-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:31" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/starting-same-true-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/starting-same-true-output.json new file mode 100644 index 0000000..482a648 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/starting-same-true-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:30" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/wrong-case-false-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/wrong-case-false-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/wrong-case-false-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/wrong-case-true-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/wrong-case-true-output.json new file mode 100644 index 0000000..8e88652 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool/wrong-case-true-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-cr-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-cr-output.json new file mode 100644 index 0000000..0610846 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-cr-output.json @@ -0,0 +1,59 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [], + "range": [ + 0, + 0 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + } + } + ], + "sourceType": "module", + "tokens": [], + "comments": [ + { + "type": "Block", + "value": " The following line contains a single carriage return control character", + "range": [ + 0, + 72 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 72 + } + } + } + ], + "range": [ + 0, + 75 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-cr-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-cr-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-formfeed-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-formfeed-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-formfeed-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-null-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-null-output.json new file mode 100644 index 0000000..2fd93ce --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-null-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:33" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-vertical-tab-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-vertical-tab-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/bare-vertical-tab-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-cr-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-cr-output.json new file mode 100644 index 0000000..0d41b87 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-cr-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:46" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-del-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-del-output.json new file mode 100644 index 0000000..3d90bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-del-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-ff-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-ff-output.json new file mode 100644 index 0000000..3d90bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-ff-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-lf-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-lf-output.json new file mode 100644 index 0000000..3d90bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-lf-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-null-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-null-output.json new file mode 100644 index 0000000..3d90bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-null-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-us-output.json new file mode 100644 index 0000000..3d90bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/comment-us-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-cr-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-cr-output.json new file mode 100644 index 0000000..c694e6c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-cr-output.json @@ -0,0 +1,172 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multi-cr", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "null\n", + "style": "basic", + "multiline": true, + "range": [ + 13, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "range": [ + 0, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "range": [ + 0, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "multi-cr", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"null\r\"\"\"", + "string": "null\n", + "range": [ + 13, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "comments": [], + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-cr-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-cr-value.json new file mode 100644 index 0000000..8506f5a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-cr-value.json @@ -0,0 +1,3 @@ +{ + "multi-cr": "null\n" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-del-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-del-output.json new file mode 100644 index 0000000..95e2352 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-del-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-lf-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-lf-output.json new file mode 100644 index 0000000..95e2352 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-lf-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-null-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-null-output.json new file mode 100644 index 0000000..95e2352 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-null-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-us-output.json new file mode 100644 index 0000000..95e2352 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/multi-us-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-float-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-cd-output.json similarity index 81% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-float-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-cd-output.json index 1b3db07..dac1e26 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-float-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-cd-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "electron_mass", + "name": "rawmulti-cd", "range": [ 0, - 13 + 11 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 13 + "column": 11 } } } ], "range": [ 0, - 13 + 11 ], "loc": { "start": { @@ -39,18 +39,19 @@ }, "end": { "line": 1, - "column": 13 + "column": 11 } } }, "value": { "type": "TOMLValue", - "kind": "float", - "value": 9.109109383e-31, - "number": "9109.109383e-34", + "kind": "string", + "value": "null\n", + "style": "literal", + "multiline": true, "range": [ 16, - 34 + 27 ], "loc": { "start": { @@ -59,13 +60,13 @@ }, "end": { "line": 1, - "column": 34 + "column": 26 } } }, "range": [ 0, - 34 + 27 ], "loc": { "start": { @@ -74,14 +75,14 @@ }, "end": { "line": 1, - "column": 34 + "column": 26 } } } ], "range": [ 0, - 34 + 27 ], "loc": { "start": { @@ -90,7 +91,7 @@ }, "end": { "line": 1, - "column": 34 + "column": 26 } } } @@ -99,10 +100,10 @@ "tokens": [ { "type": "Bare", - "value": "electron_mass", + "value": "rawmulti-cd", "range": [ 0, - 13 + 11 ], "loc": { "start": { @@ -111,7 +112,7 @@ }, "end": { "line": 1, - "column": 13 + "column": 11 } } }, @@ -134,12 +135,12 @@ } }, { - "type": "Float", - "value": "9_109.109_383e-3_4", - "number": 9.109109383e-31, + "type": "MultiLineLiteralString", + "value": "'''null\r'''", + "string": "null\n", "range": [ 16, - 34 + 27 ], "loc": { "start": { @@ -148,7 +149,7 @@ }, "end": { "line": 1, - "column": 34 + "column": 26 } } } @@ -156,7 +157,7 @@ "comments": [], "range": [ 0, - 35 + 28 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-cd-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-cd-value.json new file mode 100644 index 0000000..38c2611 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-cd-value.json @@ -0,0 +1,3 @@ +{ + "rawmulti-cd": "null\n" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-del-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-del-output.json new file mode 100644 index 0000000..0c6dc8a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-del-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-lf-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-lf-output.json new file mode 100644 index 0000000..0c6dc8a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-lf-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-null-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-null-output.json new file mode 100644 index 0000000..0c6dc8a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-null-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-us-output.json new file mode 100644 index 0000000..0c6dc8a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawmulti-us-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-cr-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-cr-output.json new file mode 100644 index 0000000..deb68cc --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-cr-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-del-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-del-output.json new file mode 100644 index 0000000..77d213a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-del-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-lf-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-lf-output.json new file mode 100644 index 0000000..77d213a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-lf-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-null-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-null-output.json new file mode 100644 index 0000000..77d213a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-null-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-us-output.json new file mode 100644 index 0000000..77d213a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/rawstring-us-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-bs-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-bs-output.json new file mode 100644 index 0000000..e80b512 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-bs-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-cr-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-cr-output.json new file mode 100644 index 0000000..cbd862f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-cr-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-del-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-del-output.json new file mode 100644 index 0000000..7657b48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-del-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-lf-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-lf-output.json new file mode 100644 index 0000000..7657b48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-lf-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-null-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-null-output.json new file mode 100644 index 0000000..7657b48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-null-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-us-output.json new file mode 100644 index 0000000..7657b48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/control/string-us-output.json @@ -0,0 +1 @@ +"Control characters (codes < 0x1f and 0x7f) are not allowed@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/feb-29-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/feb-29-output.json new file mode 100644 index 0000000..ea65095 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/feb-29-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:1,column:29" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/feb-30-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/feb-30-output.json new file mode 100644 index 0000000..ac94af6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/feb-30-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:1,column:44" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/hour-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/hour-over-output.json new file mode 100644 index 0000000..e0ff881 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/hour-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/mday-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/mday-over-output.json new file mode 100644 index 0000000..e7af0b7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/mday-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:3,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/mday-under-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/mday-under-output.json new file mode 100644 index 0000000..e7af0b7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/mday-under-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:3,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/minute-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/minute-over-output.json new file mode 100644 index 0000000..e0ff881 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/minute-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/month-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/month-over-output.json new file mode 100644 index 0000000..a3dcfc6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/month-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:2,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/month-under-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/month-under-output.json new file mode 100644 index 0000000..a3dcfc6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/month-under-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:2,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-month-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-month-output.json new file mode 100644 index 0000000..8170b3b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-month-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-output.json new file mode 100644 index 0000000..8170b3b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-with-milli-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-with-milli-output.json new file mode 100644 index 0000000..ad205db --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-leads-with-milli-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-secs-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-secs-output.json new file mode 100644 index 0000000..22d157a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-secs-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-t-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-t-output.json new file mode 100644 index 0000000..151382b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/no-t-output.json @@ -0,0 +1 @@ +"Must be a newline@line:2,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/second-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/second-over-output.json new file mode 100644 index 0000000..74bdb19 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/second-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:3,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/time-no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/time-no-leads-output.json new file mode 100644 index 0000000..b962044 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime/time-no-leads-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-codepoint-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-codepoint-output.json new file mode 100644 index 0000000..142d116 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-codepoint-output.json @@ -0,0 +1,59 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [], + "range": [ + 0, + 0 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + } + } + ], + "sourceType": "module", + "tokens": [], + "comments": [ + { + "type": "Block", + "value": " Invalid codepoint U+D800 : ���", + "range": [ + 0, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + } + } + ], + "range": [ + 0, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-codepoint-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-codepoint-value.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-codepoint-value.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-at-end-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-at-end-output.json new file mode 100644 index 0000000..c2346c6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-at-end-output.json @@ -0,0 +1 @@ +"Unexpected character@line:5,column:10" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-comment-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-comment-output.json new file mode 100644 index 0000000..a0b7ef6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-comment-output.json @@ -0,0 +1,59 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [], + "range": [ + 0, + 0 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + } + } + ], + "sourceType": "module", + "tokens": [], + "comments": [ + { + "type": "Block", + "value": " �", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-comment-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-comment-value.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-comment-value.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-literal-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-literal-output.json new file mode 100644 index 0000000..8dfd992 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-literal-output.json @@ -0,0 +1,191 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "�", + "style": "literal", + "multiline": true, + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''�'''", + "string": "�", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " The following line contains an invalid UTF-8 sequence.", + "range": [ + 0, + 56 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + } + } + ], + "range": [ + 0, + 71 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-literal-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-literal-value.json new file mode 100644 index 0000000..14938b8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-literal-value.json @@ -0,0 +1,3 @@ +{ + "bad": "�" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-output.json new file mode 100644 index 0000000..96b582c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-output.json @@ -0,0 +1,191 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "�", + "style": "basic", + "multiline": true, + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"�\"\"\"", + "string": "�", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " The following line contains an invalid UTF-8 sequence.", + "range": [ + 0, + 56 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + } + } + ], + "range": [ + 0, + 71 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-value.json new file mode 100644 index 0000000..14938b8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-multiline-value.json @@ -0,0 +1,3 @@ +{ + "bad": "�" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-literal-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-literal-output.json new file mode 100644 index 0000000..2cd2252 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-literal-output.json @@ -0,0 +1,191 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "�", + "style": "literal", + "multiline": false, + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "range": [ + 57, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "range": [ + 57, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "LiteralString", + "value": "'�'", + "string": "�", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " The following line contains an invalid UTF-8 sequence.", + "range": [ + 0, + 56 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + } + } + ], + "range": [ + 0, + 67 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-literal-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-literal-value.json new file mode 100644 index 0000000..14938b8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-literal-value.json @@ -0,0 +1,3 @@ +{ + "bad": "�" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-output.json new file mode 100644 index 0000000..d061c0d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-output.json @@ -0,0 +1,191 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "�", + "style": "basic", + "multiline": false, + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "range": [ + 57, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "range": [ + 57, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "bad", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"�\"", + "string": "�", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " The following line contains an invalid UTF-8 sequence.", + "range": [ + 0, + 56 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + } + } + ], + "range": [ + 0, + 67 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-value.json new file mode 100644 index 0000000..14938b8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bad-utf8-in-string-value.json @@ -0,0 +1,3 @@ +{ + "bad": "�" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bom-not-at-start-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-no-leads-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bom-not-at-start-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bom-not-at-start-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bom-not-at-start-2-output.json new file mode 100644 index 0000000..723125e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/bom-not-at-start-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/utf16-bom-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/utf16-bom-output.json new file mode 100644 index 0000000..727717c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/utf16-bom-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/utf16-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/utf16-output.json new file mode 100644 index 0000000..727717c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/encoding/utf16-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-neg-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-neg-output.json deleted file mode 100644 index de023d4..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-neg-output.json +++ /dev/null @@ -1 +0,0 @@ -"Must be a newline@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-pos-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-pos-output.json deleted file mode 100644 index de023d4..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-pos-output.json +++ /dev/null @@ -1 +0,0 @@ -"Must be a newline@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-no-trailing-digits-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-no-trailing-digits-output.json deleted file mode 100644 index 3f4ebc5..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-no-trailing-digits-output.json +++ /dev/null @@ -1 +0,0 @@ -"Unexpected character@line:1,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-after-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-after-output.json deleted file mode 100644 index d7a8325..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-after-output.json +++ /dev/null @@ -1 +0,0 @@ -"Underscores are allowed between digits@line:1,column:10" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-after-point-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-after-point-output.json deleted file mode 100644 index 0492303..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-after-point-output.json +++ /dev/null @@ -1 +0,0 @@ -"Underscores are allowed between digits@line:1,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-before-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-before-output.json deleted file mode 100644 index e12124c..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-before-output.json +++ /dev/null @@ -1 +0,0 @@ -"Unexpected character@line:1,column:6" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-before-point-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-before-point-output.json deleted file mode 100644 index 0492303..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-underscore-before-point-output.json +++ /dev/null @@ -1 +0,0 @@ -"Underscores are allowed between digits@line:1,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/double-point-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/double-point-1-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/double-point-1-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/double-point-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/double-point-2-output.json new file mode 100644 index 0000000..7353bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/double-point-2-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-e-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-e-1-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-e-1-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-e-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-e-2-output.json new file mode 100644 index 0000000..7353bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-e-2-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-us-output.json new file mode 100644 index 0000000..3eafb81 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-double-us-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-leading-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-leading-us-output.json new file mode 100644 index 0000000..3b423c0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-leading-us-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-no-t-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-point-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-no-t-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-point-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-point-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-point-2-output.json new file mode 100644 index 0000000..79e81f7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-point-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-trailing-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-trailing-us-output.json new file mode 100644 index 0000000..28ef93e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/exp-trailing-us-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool-wrong-case-false-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-capital-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool-wrong-case-false-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-capital-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-1-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-1-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-2-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-3-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf-incomplete-3-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf_underscore-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf_underscore-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/inf_underscore-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-neg-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-neg-output.json new file mode 100644 index 0000000..d45a7eb --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-neg-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-output.json new file mode 100644 index 0000000..9e9dd5c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-with-milli-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-plus-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/datetime-malformed-with-milli-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-point-plus-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-us-output.json new file mode 100644 index 0000000..d4fccf9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-us-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-neg-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-neg-output.json new file mode 100644 index 0000000..2152078 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-neg-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-leading-zero-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-plus-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-plus-output.json new file mode 100644 index 0000000..76a6322 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/leading-zero-plus-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool-wrong-case-true-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-capital-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/bool-wrong-case-true-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-capital-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-1-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-1-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-2-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-3-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan-incomplete-3-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan_underscore-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan_underscore-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/nan_underscore-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-min-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-min-output.json new file mode 100644 index 0000000..a691a70 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-min-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-plus-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-plus-output.json new file mode 100644 index 0000000..14574a0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-point-plus-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:25" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-exp-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-exp-1-output.json new file mode 100644 index 0000000..5d5b031 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-exp-1-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-exp-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-exp-2-output.json new file mode 100644 index 0000000..9455785 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-exp-2-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-output.json new file mode 100644 index 0000000..3eafb81 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/trailing-us-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/us-after-point-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/us-after-point-output.json new file mode 100644 index 0000000..3b423c0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/us-after-point-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/us-before-point-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/us-before-point-output.json new file mode 100644 index 0000000..d6969a6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float/us-before-point-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/bad-key-syntax-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/bad-key-syntax-output.json new file mode 100644 index 0000000..0dc3a2d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/bad-key-syntax-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-no-leading-zero-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/double-comma-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/float-no-leading-zero-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/double-comma-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-1-output.json new file mode 100644 index 0000000..d25f06a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:2,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-2-output.json new file mode 100644 index 0000000..2796dab --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:1,column:35" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-3-output.json new file mode 100644 index 0000000..c3c5477 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-3-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:1,column:41" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-4-output.json new file mode 100644 index 0000000..6e9b890 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/duplicate-key-4-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-two-equals-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-two-equals-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-2-output.json new file mode 100644 index 0000000..a7acb09 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-2-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:5" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table-linebreak-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-3-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table-linebreak-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/empty-3-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-1-output.json new file mode 100644 index 0000000..cc5d73c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-1-output.json @@ -0,0 +1 @@ +"No newlines are allowed between the curly braces unless they are valid within a value@line:4,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-2-output.json new file mode 100644 index 0000000..dce132a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-2-output.json @@ -0,0 +1 @@ +"No newlines are allowed between the curly braces unless they are valid within a value@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-3-output.json new file mode 100644 index 0000000..dce132a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-3-output.json @@ -0,0 +1 @@ +"No newlines are allowed between the curly braces unless they are valid within a value@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/multi-line-inline-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-4-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/multi-line-inline-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/linebreak-4-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-close-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-close-1-output.json new file mode 100644 index 0000000..d0b7233 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-close-1-output.json @@ -0,0 +1 @@ +"Unexpected token@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-close-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-close-2-output.json new file mode 100644 index 0000000..dc0dc79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-close-2-output.json @@ -0,0 +1 @@ +"Unterminated inline table@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-comma-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-comma-1-output.json new file mode 100644 index 0000000..3f15e3b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-comma-1-output.json @@ -0,0 +1 @@ +"Expected comma (,) token@line:1,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-comma-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-comma-2-output.json new file mode 100644 index 0000000..842d17b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/no-comma-2-output.json @@ -0,0 +1 @@ +"Expected comma (,) token@line:1,column:30" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-1-output.json new file mode 100644 index 0000000..574f51a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-2-output.json new file mode 100644 index 0000000..5247a89 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/duplicate-keys-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-3-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/duplicate-keys-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-3-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-4-output.json new file mode 100644 index 0000000..78d904e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-4-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-5-output.json new file mode 100644 index 0000000..5247a89 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-5-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-6-output.json new file mode 100644 index 0000000..9ce0511 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-6-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:1,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-7-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-7-output.json new file mode 100644 index 0000000..8cc5f0d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-7-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:1,column:34" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-8-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-8-output.json new file mode 100644 index 0000000..8cc5f0d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-8-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:1,column:34" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-9-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-9-output.json new file mode 100644 index 0000000..6128939 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/overwrite-9-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:5,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/trailing-comma-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/trailing-comma-output.json new file mode 100644 index 0000000..dd2ac67 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/inline-table/trailing-comma-output.json @@ -0,0 +1 @@ +"Trailing comma is not permitted in an inline table@line:3,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-neg-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-neg-output.json deleted file mode 100644 index de023d4..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-neg-output.json +++ /dev/null @@ -1 +0,0 @@ -"Must be a newline@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-output.json deleted file mode 100644 index 86c7465..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-output.json +++ /dev/null @@ -1 +0,0 @@ -"Leading zeros are not allowed@line:1,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-pos-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-pos-output.json deleted file mode 100644 index de023d4..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-leading-zero-pos-output.json +++ /dev/null @@ -1 +0,0 @@ -"Must be a newline@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-after-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-after-output.json deleted file mode 100644 index d7a8325..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-after-output.json +++ /dev/null @@ -1 +0,0 @@ -"Underscores are allowed between digits@line:1,column:10" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-before-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-before-output.json deleted file mode 100644 index e12124c..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-before-output.json +++ /dev/null @@ -1 +0,0 @@ -"Unexpected character@line:1,column:6" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-double-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-double-output.json deleted file mode 100644 index 0492303..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer-underscore-double-output.json +++ /dev/null @@ -1 +0,0 @@ -"Underscores are allowed between digits@line:1,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-bin-output.json new file mode 100644 index 0000000..a015e55 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-bin-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-hex-output.json new file mode 100644 index 0000000..a015e55 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-hex-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-oct-output.json new file mode 100644 index 0000000..a015e55 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/capital-oct-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-sign-nex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-sign-nex-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-sign-nex-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-sign-plus-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-sign-plus-output.json new file mode 100644 index 0000000..9741c4d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-sign-plus-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-us-output.json new file mode 100644 index 0000000..9686015 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/double-us-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:14" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-bin-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-bin-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-hex-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-hex-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-oct-output.json new file mode 100644 index 0000000..d8f1c21 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/incomplete-oct-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-bin-output.json new file mode 100644 index 0000000..90519b3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-bin-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-1-output.json new file mode 100644 index 0000000..2152078 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-1-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-2-output.json new file mode 100644 index 0000000..723125e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-output.json new file mode 100644 index 0000000..90519b3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-hex-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-oct-output.json new file mode 100644 index 0000000..be06c09 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/invalid-oct-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-bin-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-bin-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-hex-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-hex-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-oct-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-oct-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-output.json new file mode 100644 index 0000000..d4fccf9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-us-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-1-output.json new file mode 100644 index 0000000..8e4cc22 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-1-output.json @@ -0,0 +1 @@ +"Leading zeros are not allowed@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-2-output.json new file mode 100644 index 0000000..8e4cc22 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-2-output.json @@ -0,0 +1 @@ +"Leading zeros are not allowed@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-3-output.json new file mode 100644 index 0000000..be06c09 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-3-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-1-output.json new file mode 100644 index 0000000..94998e9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-1-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-2-output.json new file mode 100644 index 0000000..94998e9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-2-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-3-output.json new file mode 100644 index 0000000..94998e9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/leading-zero-sign-3-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-bin-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-bin-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-hex-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-hex-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-oct-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/negative-oct-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-bin-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-bin-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-hex-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-hex-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-oct-output.json new file mode 100644 index 0000000..250461a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/positive-oct-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-integer-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/text-after-integer-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-integer-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/text-after-integer-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-bin-output.json new file mode 100644 index 0000000..5d5b031 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-bin-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-hex-output.json new file mode 100644 index 0000000..5d5b031 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-hex-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-oct-output.json new file mode 100644 index 0000000..5d5b031 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-oct-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-output.json new file mode 100644 index 0000000..3eafb81 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/trailing-us-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-bin-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-bin-output.json new file mode 100644 index 0000000..774aa46 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-bin-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-hex-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-hex-output.json new file mode 100644 index 0000000..774aa46 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-hex-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-oct-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-oct-output.json new file mode 100644 index 0000000..774aa46 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/integer/us-after-oct-output.json @@ -0,0 +1 @@ +"Underscores are allowed between digits@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-single-open-bracket-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-single-open-bracket-output.json deleted file mode 100644 index 0113d4d..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-single-open-bracket-output.json +++ /dev/null @@ -1 +0,0 @@ -"Unterminated table-key@line:1,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-after-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-array-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-after-array-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-array-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-after-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-table-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-after-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-table-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-value-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-value-output.json new file mode 100644 index 0000000..e33d9ef --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/after-value-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:14" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/bare-invalid-character-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/bare-invalid-character-output.json new file mode 100644 index 0000000..284d84c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/bare-invalid-character-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:4" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/dotted-redefine-table-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/dotted-redefine-table-1-output.json new file mode 100644 index 0000000..4c63ab7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/dotted-redefine-table-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/dotted-redefine-table-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/dotted-redefine-table-2-output.json new file mode 100644 index 0000000..47045cd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/dotted-redefine-table-2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/duplicate-keys-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/duplicate-keys-output.json new file mode 100644 index 0000000..4c63ab7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/duplicate-keys-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/duplicate-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/duplicate-output.json new file mode 100644 index 0000000..574f51a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/duplicate-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/end-in-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/end-in-escape-output.json new file mode 100644 index 0000000..c030f9a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/end-in-escape-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:28" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/escape-output.json new file mode 100644 index 0000000..727717c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/escape-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-hash-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/hash-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-hash-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/hash-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/multiline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/multiline-output.json new file mode 100644 index 0000000..dba5370 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/multiline-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/newline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/newline-output.json new file mode 100644 index 0000000..46fd56a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/newline-output.json @@ -0,0 +1 @@ +"The key, equals sign, and value must be on the same line@line:2,column:3" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-no-eol-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/no-eol-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-no-eol-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/no-eol-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-open-bracket-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/open-bracket-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-open-bracket-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/open-bracket-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/partial-quoted-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/partial-quoted-output.json new file mode 100644 index 0000000..a5e9ace --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/partial-quoted-output.json @@ -0,0 +1 @@ +"Expected equal (=) token@line:1,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/quoted-unclosed-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/quoted-unclosed-1-output.json new file mode 100644 index 0000000..d09f6e7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/quoted-unclosed-1-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/quoted-unclosed-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/quoted-unclosed-2-output.json new file mode 100644 index 0000000..b64b1bc --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/quoted-unclosed-2-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:4" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/single-open-bracket-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/single-open-bracket-output.json new file mode 100644 index 0000000..cc8ae48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/single-open-bracket-output.json @@ -0,0 +1 @@ +"Unterminated table-key@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-space-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/space-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-space-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/space-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/special-character-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/special-character-output.json new file mode 100644 index 0000000..727717c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/special-character-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-start-bracket-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/start-bracket-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-start-bracket-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/start-bracket-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/start-dot-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/start-dot-output.json new file mode 100644 index 0000000..dba5370 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/start-dot-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals-output.json new file mode 100644 index 0000000..a7acb09 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:5" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals2-output.json new file mode 100644 index 0000000..031b163 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals2-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals3-output.json new file mode 100644 index 0000000..01a5b31 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/two-equals3-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-1-output.json new file mode 100644 index 0000000..6191242 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-1-output.json @@ -0,0 +1 @@ +"Expected equal (=) token@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-2-output.json new file mode 100644 index 0000000..cf6c303 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-2-output.json @@ -0,0 +1 @@ +"Unspecified values are invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-3-output.json new file mode 100644 index 0000000..6191242 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-3-output.json @@ -0,0 +1 @@ +"Expected equal (=) token@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-4-output.json new file mode 100644 index 0000000..cf6c303 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-4-output.json @@ -0,0 +1 @@ +"Unspecified values are invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-5-output.json new file mode 100644 index 0000000..6191242 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-5-output.json @@ -0,0 +1 @@ +"Expected equal (=) token@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-6-output.json new file mode 100644 index 0000000..cf6c303 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-6-output.json @@ -0,0 +1 @@ +"Unspecified values are invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-7-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-7-output.json new file mode 100644 index 0000000..6191242 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key/without-value-7-output.json @@ -0,0 +1 @@ +"Expected equal (=) token@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/feb-29-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/feb-29-output.json new file mode 100644 index 0000000..ea65095 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/feb-29-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:1,column:29" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/feb-30-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/feb-30-output.json new file mode 100644 index 0000000..ac94af6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/feb-30-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:1,column:44" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/mday-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/mday-over-output.json new file mode 100644 index 0000000..e7af0b7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/mday-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:3,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/mday-under-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/mday-under-output.json new file mode 100644 index 0000000..e7af0b7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/mday-under-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:3,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/month-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/month-over-output.json new file mode 100644 index 0000000..a3dcfc6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/month-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:2,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/month-under-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/month-under-output.json new file mode 100644 index 0000000..a3dcfc6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/month-under-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:2,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/no-leads-output.json new file mode 100644 index 0000000..8170b3b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/no-leads-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/no-leads-with-milli-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/no-leads-with-milli-output.json new file mode 100644 index 0000000..ad205db --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/no-leads-with-milli-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/trailing-t-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/trailing-t-output.json new file mode 100644 index 0000000..97c67b3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-date/trailing-t-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/feb-29-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/feb-29-output.json new file mode 100644 index 0000000..ea65095 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/feb-29-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:1,column:29" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/feb-30-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/feb-30-output.json new file mode 100644 index 0000000..ac94af6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/feb-30-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:1,column:44" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/hour-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/hour-over-output.json new file mode 100644 index 0000000..e0ff881 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/hour-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/mday-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/mday-over-output.json new file mode 100644 index 0000000..e7af0b7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/mday-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:3,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/mday-under-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/mday-under-output.json new file mode 100644 index 0000000..e7af0b7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/mday-under-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:3,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/minute-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/minute-over-output.json new file mode 100644 index 0000000..e0ff881 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/minute-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/month-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/month-over-output.json new file mode 100644 index 0000000..a3dcfc6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/month-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:2,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/month-under-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/month-under-output.json new file mode 100644 index 0000000..a3dcfc6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/month-under-output.json @@ -0,0 +1 @@ +"Unexpected invalid date@line:2,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-leads-output.json new file mode 100644 index 0000000..8170b3b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-leads-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-leads-with-milli-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-leads-with-milli-output.json new file mode 100644 index 0000000..ad205db --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-leads-with-milli-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-secs-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-secs-output.json new file mode 100644 index 0000000..22d157a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-secs-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:26" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-t-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-t-output.json new file mode 100644 index 0000000..151382b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/no-t-output.json @@ -0,0 +1 @@ +"Must be a newline@line:2,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/second-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/second-over-output.json new file mode 100644 index 0000000..74bdb19 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/second-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:3,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/time-no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/time-no-leads-output.json new file mode 100644 index 0000000..b962044 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-datetime/time-no-leads-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/hour-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/hour-over-output.json new file mode 100644 index 0000000..acef408 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/hour-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:2,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/minute-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/minute-over-output.json new file mode 100644 index 0000000..acef408 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/minute-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:2,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/no-secs-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/no-secs-output.json new file mode 100644 index 0000000..97c67b3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/no-secs-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/second-over-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/second-over-output.json new file mode 100644 index 0000000..b2653c9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/second-over-output.json @@ -0,0 +1 @@ +"Unexpected invalid time@line:3,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/time-no-leads-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/time-no-leads-2-output.json new file mode 100644 index 0000000..c473971 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/time-no-leads-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/time-no-leads-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/time-no-leads-output.json new file mode 100644 index 0000000..245051d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/local-time/time-no-leads-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:5" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/inline-table-2-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/inline-table-2-0-output.json new file mode 100644 index 0000000..574f51a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/inline-table-2-0-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/inline-table-3-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/inline-table-3-0-output.json new file mode 100644 index 0000000..574f51a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/inline-table-3-0-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/key-value-pair-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/key-value-pair-1-output.json new file mode 100644 index 0000000..cf6c303 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/key-value-pair-1-output.json @@ -0,0 +1 @@ +"Unspecified values are invalid@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/keys-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/keys-2-output.json new file mode 100644 index 0000000..dba5370 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/keys-2-output.json @@ -0,0 +1 @@ +"Unexpected token@line:1,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/string-4-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/string-4-0-output.json new file mode 100644 index 0000000..678f404 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/string-4-0-output.json @@ -0,0 +1 @@ +"Must be a newline@line:2,column:45" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/string-7-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/string-7-0-output.json new file mode 100644 index 0000000..0fb2f1a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/string-7-0-output.json @@ -0,0 +1 @@ +"Three or more quotes are not permitted@line:3,column:42" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/table-9-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/table-9-0-output.json new file mode 100644 index 0000000..01b9392 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/table-9-0-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:5,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/table-9-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/table-9-1-output.json new file mode 100644 index 0000000..326350d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/spec/table-9-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:6,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-codepoint-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-codepoint-output.json deleted file mode 100644 index 29201ff..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-codepoint-output.json +++ /dev/null @@ -1 +0,0 @@ -"Invalid code point D801@line:1,column:78" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-byte-escapes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-byte-escapes-output.json deleted file mode 100644 index fbcab90..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-byte-escapes-output.json +++ /dev/null @@ -1 +0,0 @@ -"Invalid character in escape sequence@line:1,column:11" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-byte-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-byte-escape-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-byte-escape-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-byte-escape-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-concat-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-concat-output.json new file mode 100644 index 0000000..7353bc9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-concat-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-escape-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-slash-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-2-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-slash-escape-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-2-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-3-output.json new file mode 100644 index 0000000..c4fba68 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-escape-3-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:15" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-1-output.json new file mode 100644 index 0000000..37d1f79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-1-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-2-output.json new file mode 100644 index 0000000..37d1f79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-2-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-3-output.json new file mode 100644 index 0000000..37d1f79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-3-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-4-output.json new file mode 100644 index 0000000..37d1f79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-4-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-5-output.json new file mode 100644 index 0000000..37d1f79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-hex-esc-5-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-multiline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-multiline-output.json new file mode 100644 index 0000000..cbd862f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-multiline-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:19" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-slash-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-slash-escape-output.json new file mode 100644 index 0000000..a647d71 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-slash-escape-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:41" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-1-output.json new file mode 100644 index 0000000..9f5406b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-1-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-2-output.json new file mode 100644 index 0000000..9f5406b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-2-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-3-output.json new file mode 100644 index 0000000..9f5406b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-3-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-4-output.json new file mode 100644 index 0000000..9f5406b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-4-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-5-output.json new file mode 100644 index 0000000..9f5406b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-5-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:21" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-6-output.json new file mode 100644 index 0000000..aabb1cd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-6-output.json @@ -0,0 +1 @@ +"Invalid code point D801@line:1,column:74" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-7-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-7-output.json new file mode 100644 index 0000000..37d1f79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/bad-uni-esc-7-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:18" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-uni-esc-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-byte-escapes-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-bad-uni-esc-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-byte-escapes-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-1-output.json new file mode 100644 index 0000000..a0223c5 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-1-output.json @@ -0,0 +1 @@ +"Invalid code point FFFFFFFF@line:1,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-2-output.json new file mode 100644 index 0000000..880b7c7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-out-of-range-unicode-escape-2-output.json @@ -0,0 +1 @@ +"Invalid code point 00D80000@line:1,column:16" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-quotes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-quotes-output.json new file mode 100644 index 0000000..0bfd0ed --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-quotes-output.json @@ -0,0 +1 @@ +"Must be a newline@line:1,column:45" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-unknown-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-unknown-escape-output.json new file mode 100644 index 0000000..c2d5c89 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-multiline-unknown-escape-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-1-output.json new file mode 100644 index 0000000..d0eda7d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-1-output.json @@ -0,0 +1 @@ +"Invalid code point FFFFFFFF@line:1,column:14" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-2-output.json new file mode 100644 index 0000000..74df8bc --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-out-of-range-unicode-escape-2-output.json @@ -0,0 +1 @@ +"Invalid code point 00D80000@line:1,column:14" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-unknown-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-unknown-escape-output.json new file mode 100644 index 0000000..c5e72f3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/basic-unknown-escape-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:6" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/literal-multiline-quotes-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/literal-multiline-quotes-1-output.json new file mode 100644 index 0000000..2a51939 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/literal-multiline-quotes-1-output.json @@ -0,0 +1 @@ +"Three or more quotes are not permitted@line:1,column:22" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/literal-multiline-quotes-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/literal-multiline-quotes-2-output.json new file mode 100644 index 0000000..9c10860 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/literal-multiline-quotes-2-output.json @@ -0,0 +1 @@ +"Three or more quotes are not permitted@line:1,column:23" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/missing-quotes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/missing-quotes-output.json new file mode 100644 index 0000000..7236e0e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/missing-quotes-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-1-output.json new file mode 100644 index 0000000..33ad313 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-1-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:9" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-2-output.json new file mode 100644 index 0000000..5213332 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-2-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:2,column:9" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-3-output.json new file mode 100644 index 0000000..5213332 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-3-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:2,column:9" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-4-output.json new file mode 100644 index 0000000..eb5b47d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-bad-escape-4-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-escape-space-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-escape-space-1-output.json new file mode 100644 index 0000000..a19b874 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-escape-space-1-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:2,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-escape-space-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-escape-space-2-output.json new file mode 100644 index 0000000..482d695 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-escape-space-2-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:4,column:5" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/multi-line-string-no-close-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/multi-line-string-no-close-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-2-output.json new file mode 100644 index 0000000..eb5b47d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-2-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-3-output.json new file mode 100644 index 0000000..b5de2f9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-3-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:5,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-4-output.json new file mode 100644 index 0000000..2413db8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-lit-no-close-4-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:4,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-1-output.json new file mode 100644 index 0000000..4b5b94b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-1-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-2-output.json new file mode 100644 index 0000000..eb5b47d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-2-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-3-output.json new file mode 100644 index 0000000..b5de2f9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-3-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:5,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-4-output.json new file mode 100644 index 0000000..2413db8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-4-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:4,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-5-output.json new file mode 100644 index 0000000..2413db8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-no-close-5-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:4,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-quotes-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-quotes-1-output.json new file mode 100644 index 0000000..78180bc --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/multiline-quotes-1-output.json @@ -0,0 +1 @@ +"Three or more quotes are not permitted@line:1,column:17" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-no-close-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string-no-close-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-2-output.json new file mode 100644 index 0000000..2b782ec --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-2-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:28" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-3-output.json new file mode 100644 index 0000000..a8e6ef0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-3-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:41" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-4-output.json new file mode 100644 index 0000000..2b782ec --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/no-close-4-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:28" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-string-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/text-after-string-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-string-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/text-after-string-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/wrong-close-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/wrong-close-output.json new file mode 100644 index 0000000..a72541a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/string/wrong-close-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:38" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-empty-output.json deleted file mode 100644 index bbf7627..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-empty-output.json +++ /dev/null @@ -1 +0,0 @@ -"Empty bare keys are not allowed@line:1,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-to-array-with-dotted-keys-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-to-array-with-dotted-keys-output.json new file mode 100644 index 0000000..9b89eea --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-to-array-with-dotted-keys-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-with-dotted-keys-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-with-dotted-keys-1-output.json new file mode 100644 index 0000000..d96f56a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-with-dotted-keys-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:17,column:4" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-with-dotted-keys-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-with-dotted-keys-2-output.json new file mode 100644 index 0000000..792e96c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/append-with-dotted-keys-2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:8,column:6" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-array-malformed-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-array-malformed-empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-array-implicit-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-implicit-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-array-implicit-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-implicit-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-newline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-no-close-1-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/key-newline-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-no-close-1-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-array-malformed-bracket-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-no-close-2-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-array-malformed-bracket-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/array-no-close-2-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-array-output.json new file mode 100644 index 0000000..9cee1ed --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-array-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/duplicate-key-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-table-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/duplicate-key-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-table-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-table2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-table2-output.json new file mode 100644 index 0000000..514c0e5 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-dotted-table2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:13" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-table-output.json new file mode 100644 index 0000000..8363632 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-key-table-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-output.json new file mode 100644 index 0000000..17c5dd5 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-table-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-table-array-output.json new file mode 100644 index 0000000..03c4629 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-table-array-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:2,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/duplicate-tables-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-table-array2-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/duplicate-tables-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/duplicate-table-array2-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/empty-implicit-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/empty-implicit-table-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/empty-implicit-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/empty-implicit-table-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/empty-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/empty-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/equals-sign-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/equals-sign-output.json new file mode 100644 index 0000000..3735d2b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/equals-sign-output.json @@ -0,0 +1 @@ +"Unterminated table-key@line:1,column:5" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/llbrace-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/llbrace-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/llbrace-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/llbrace-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-nested-brackets-close-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/nested-brackets-close-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-nested-brackets-close-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/nested-brackets-close-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-nested-brackets-open-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/nested-brackets-open-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-nested-brackets-open-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/nested-brackets-open-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-1-output.json new file mode 100644 index 0000000..a3afd53 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-1-output.json @@ -0,0 +1 @@ +"Unterminated table-key@line:1,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-2-output.json new file mode 100644 index 0000000..a691a70 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-2-output.json @@ -0,0 +1 @@ +"Unexpected character@line:1,column:24" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-3-output.json new file mode 100644 index 0000000..5337444 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-3-output.json @@ -0,0 +1 @@ +"Unterminated string constant@line:1,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-4-output.json new file mode 100644 index 0000000..cc8ae48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-4-output.json @@ -0,0 +1 @@ +"Unterminated table-key@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-5-output.json new file mode 100644 index 0000000..cc8ae48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/no-close-5-output.json @@ -0,0 +1 @@ +"Unterminated table-key@line:2,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-array-in-parent-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-array-in-parent-output.json new file mode 100644 index 0000000..9b89eea --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-array-in-parent-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:4,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-bool-with-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-bool-with-array-output.json new file mode 100644 index 0000000..03c4629 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-bool-with-array-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:2,column:2" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-with-deep-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-with-deep-table-output.json new file mode 100644 index 0000000..5748d3a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/overwrite-with-deep-table-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:2,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-1-output.json new file mode 100644 index 0000000..64acc53 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-1-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:5,column:3" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-2-output.json new file mode 100644 index 0000000..b359291 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-2-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:4" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-3-output.json new file mode 100644 index 0000000..501d82c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/redefine-3-output.json @@ -0,0 +1 @@ +"Defining a key multiple times is invalid@line:3,column:7" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/rrbrace-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/rrbrace-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/rrbrace-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/rrbrace-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/text-after-table-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/text-after-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/text-after-table-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-whitespace-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/whitespace-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-whitespace-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/whitespace-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-with-pound-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/with-pound-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table-with-pound-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/table/with-pound-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-output.json similarity index 93% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-output.json index e3531e2..61b6d9e 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-output.json @@ -109,7 +109,7 @@ ], "range": [ 7, - 16 + 18 ], "loc": { "start": { @@ -118,13 +118,13 @@ }, "end": { "line": 1, - "column": 16 + "column": 18 } } }, "range": [ 0, - 16 + 18 ], "loc": { "start": { @@ -133,7 +133,7 @@ }, "end": { "line": 1, - "column": 16 + "column": 18 } } }, @@ -146,8 +146,8 @@ "type": "TOMLBare", "name": "floats", "range": [ - 17, - 23 + 19, + 25 ], "loc": { "start": { @@ -162,8 +162,8 @@ } ], "range": [ - 17, - 23 + 19, + 25 ], "loc": { "start": { @@ -185,8 +185,8 @@ "value": 1.1, "number": "1.1", "range": [ - 27, - 30 + 29, + 32 ], "loc": { "start": { @@ -205,8 +205,8 @@ "value": 2.1, "number": "2.1", "range": [ - 32, - 35 + 34, + 37 ], "loc": { "start": { @@ -225,8 +225,8 @@ "value": 3.1, "number": "3.1", "range": [ - 37, - 40 + 39, + 42 ], "loc": { "start": { @@ -241,8 +241,8 @@ } ], "range": [ - 26, - 41 + 28, + 43 ], "loc": { "start": { @@ -256,8 +256,8 @@ } }, "range": [ - 17, - 41 + 19, + 43 ], "loc": { "start": { @@ -279,8 +279,8 @@ "type": "TOMLBare", "name": "strings", "range": [ - 42, - 49 + 44, + 51 ], "loc": { "start": { @@ -295,8 +295,8 @@ } ], "range": [ - 42, - 49 + 44, + 51 ], "loc": { "start": { @@ -319,8 +319,8 @@ "style": "basic", "multiline": false, "range": [ - 53, - 56 + 55, + 58 ], "loc": { "start": { @@ -340,8 +340,8 @@ "style": "basic", "multiline": false, "range": [ - 58, - 61 + 60, + 63 ], "loc": { "start": { @@ -361,8 +361,8 @@ "style": "basic", "multiline": false, "range": [ - 63, - 66 + 65, + 68 ], "loc": { "start": { @@ -377,8 +377,8 @@ } ], "range": [ - 52, - 67 + 54, + 69 ], "loc": { "start": { @@ -392,8 +392,8 @@ } }, "range": [ - 42, - 67 + 44, + 69 ], "loc": { "start": { @@ -415,8 +415,8 @@ "type": "TOMLBare", "name": "dates", "range": [ - 68, - 73 + 70, + 75 ], "loc": { "start": { @@ -431,8 +431,8 @@ } ], "range": [ - 68, - 73 + 70, + 75 ], "loc": { "start": { @@ -454,8 +454,8 @@ "value": "1987-07-05T17:45:00.000Z", "datetime": "1987-07-05T17:45:00Z", "range": [ - 80, - 100 + 82, + 102 ], "loc": { "start": { @@ -474,8 +474,8 @@ "value": "1979-05-27T07:32:00.000Z", "datetime": "1979-05-27T07:32:00Z", "range": [ - 104, - 124 + 106, + 126 ], "loc": { "start": { @@ -494,8 +494,8 @@ "value": "2006-06-01T11:00:00.000Z", "datetime": "2006-06-01T11:00:00Z", "range": [ - 128, - 148 + 130, + 150 ], "loc": { "start": { @@ -510,8 +510,8 @@ } ], "range": [ - 76, - 151 + 78, + 153 ], "loc": { "start": { @@ -525,8 +525,8 @@ } }, "range": [ - 68, - 151 + 70, + 153 ], "loc": { "start": { @@ -548,8 +548,8 @@ "type": "TOMLBare", "name": "comments", "range": [ - 152, - 160 + 154, + 162 ], "loc": { "start": { @@ -564,8 +564,8 @@ } ], "range": [ - 152, - 160 + 154, + 162 ], "loc": { "start": { @@ -587,8 +587,8 @@ "value": 1, "number": "1", "range": [ - 174, - 175 + 176, + 177 ], "loc": { "start": { @@ -607,8 +607,8 @@ "value": 2, "number": "2", "range": [ - 186, - 187 + 188, + 189 ], "loc": { "start": { @@ -623,8 +623,8 @@ } ], "range": [ - 163, - 202 + 165, + 204 ], "loc": { "start": { @@ -638,8 +638,8 @@ } }, "range": [ - 152, - 202 + 154, + 204 ], "loc": { "start": { @@ -655,7 +655,7 @@ ], "range": [ 0, - 202 + 204 ], "loc": { "start": { @@ -820,7 +820,7 @@ }, { "type": "Punctuator", - "value": "]", + "value": ",", "range": [ 15, 16 @@ -836,12 +836,30 @@ } } }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, { "type": "Bare", "value": "floats", "range": [ - 17, - 23 + 19, + 25 ], "loc": { "start": { @@ -858,8 +876,8 @@ "type": "Punctuator", "value": "=", "range": [ - 24, - 25 + 26, + 27 ], "loc": { "start": { @@ -876,8 +894,8 @@ "type": "Punctuator", "value": "[", "range": [ - 26, - 27 + 28, + 29 ], "loc": { "start": { @@ -895,8 +913,8 @@ "value": "1.1", "number": 1.1, "range": [ - 27, - 30 + 29, + 32 ], "loc": { "start": { @@ -913,8 +931,8 @@ "type": "Punctuator", "value": ",", "range": [ - 30, - 31 + 32, + 33 ], "loc": { "start": { @@ -932,8 +950,8 @@ "value": "2.1", "number": 2.1, "range": [ - 32, - 35 + 34, + 37 ], "loc": { "start": { @@ -950,8 +968,8 @@ "type": "Punctuator", "value": ",", "range": [ - 35, - 36 + 37, + 38 ], "loc": { "start": { @@ -969,8 +987,8 @@ "value": "3.1", "number": 3.1, "range": [ - 37, - 40 + 39, + 42 ], "loc": { "start": { @@ -987,8 +1005,8 @@ "type": "Punctuator", "value": "]", "range": [ - 40, - 41 + 42, + 43 ], "loc": { "start": { @@ -1005,8 +1023,8 @@ "type": "Bare", "value": "strings", "range": [ - 42, - 49 + 44, + 51 ], "loc": { "start": { @@ -1023,8 +1041,8 @@ "type": "Punctuator", "value": "=", "range": [ - 50, - 51 + 52, + 53 ], "loc": { "start": { @@ -1041,8 +1059,8 @@ "type": "Punctuator", "value": "[", "range": [ - 52, - 53 + 54, + 55 ], "loc": { "start": { @@ -1060,8 +1078,8 @@ "value": "\"a\"", "string": "a", "range": [ - 53, - 56 + 55, + 58 ], "loc": { "start": { @@ -1078,8 +1096,8 @@ "type": "Punctuator", "value": ",", "range": [ - 56, - 57 + 58, + 59 ], "loc": { "start": { @@ -1097,8 +1115,8 @@ "value": "\"b\"", "string": "b", "range": [ - 58, - 61 + 60, + 63 ], "loc": { "start": { @@ -1115,8 +1133,8 @@ "type": "Punctuator", "value": ",", "range": [ - 61, - 62 + 63, + 64 ], "loc": { "start": { @@ -1134,8 +1152,8 @@ "value": "\"c\"", "string": "c", "range": [ - 63, - 66 + 65, + 68 ], "loc": { "start": { @@ -1152,8 +1170,8 @@ "type": "Punctuator", "value": "]", "range": [ - 66, - 67 + 68, + 69 ], "loc": { "start": { @@ -1170,8 +1188,8 @@ "type": "Bare", "value": "dates", "range": [ - 68, - 73 + 70, + 75 ], "loc": { "start": { @@ -1188,8 +1206,8 @@ "type": "Punctuator", "value": "=", "range": [ - 74, - 75 + 76, + 77 ], "loc": { "start": { @@ -1206,8 +1224,8 @@ "type": "Punctuator", "value": "[", "range": [ - 76, - 77 + 78, + 79 ], "loc": { "start": { @@ -1224,8 +1242,8 @@ "type": "OffsetDateTime", "value": "1987-07-05T17:45:00Z", "range": [ - 80, - 100 + 82, + 102 ], "loc": { "start": { @@ -1242,8 +1260,8 @@ "type": "Punctuator", "value": ",", "range": [ - 100, - 101 + 102, + 103 ], "loc": { "start": { @@ -1260,8 +1278,8 @@ "type": "OffsetDateTime", "value": "1979-05-27T07:32:00Z", "range": [ - 104, - 124 + 106, + 126 ], "loc": { "start": { @@ -1278,8 +1296,8 @@ "type": "Punctuator", "value": ",", "range": [ - 124, - 125 + 126, + 127 ], "loc": { "start": { @@ -1296,8 +1314,8 @@ "type": "OffsetDateTime", "value": "2006-06-01T11:00:00Z", "range": [ - 128, - 148 + 130, + 150 ], "loc": { "start": { @@ -1314,8 +1332,8 @@ "type": "Punctuator", "value": ",", "range": [ - 148, - 149 + 150, + 151 ], "loc": { "start": { @@ -1332,8 +1350,8 @@ "type": "Punctuator", "value": "]", "range": [ - 150, - 151 + 152, + 153 ], "loc": { "start": { @@ -1350,8 +1368,8 @@ "type": "Bare", "value": "comments", "range": [ - 152, - 160 + 154, + 162 ], "loc": { "start": { @@ -1368,8 +1386,8 @@ "type": "Punctuator", "value": "=", "range": [ - 161, - 162 + 163, + 164 ], "loc": { "start": { @@ -1386,8 +1404,8 @@ "type": "Punctuator", "value": "[", "range": [ - 163, - 164 + 165, + 166 ], "loc": { "start": { @@ -1405,8 +1423,8 @@ "value": "1", "number": 1, "range": [ - 174, - 175 + 176, + 177 ], "loc": { "start": { @@ -1423,8 +1441,8 @@ "type": "Punctuator", "value": ",", "range": [ - 175, - 176 + 177, + 178 ], "loc": { "start": { @@ -1442,8 +1460,8 @@ "value": "2", "number": 2, "range": [ - 186, - 187 + 188, + 189 ], "loc": { "start": { @@ -1460,8 +1478,8 @@ "type": "Punctuator", "value": ",", "range": [ - 187, - 188 + 189, + 190 ], "loc": { "start": { @@ -1478,8 +1496,8 @@ "type": "Punctuator", "value": "]", "range": [ - 201, - 202 + 203, + 204 ], "loc": { "start": { @@ -1498,8 +1516,8 @@ "type": "Block", "value": "this is ok", "range": [ - 189, - 200 + 191, + 202 ], "loc": { "start": { @@ -1515,7 +1533,7 @@ ], "range": [ 0, - 203 + 205 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-subtables-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-subtables-output.json new file mode 100644 index 0000000..82bfc68 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-subtables-output.json @@ -0,0 +1,940 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 2, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 2, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "resolvedKey": [ + "arr", + 0 + ], + "body": [], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 9, + 12 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "subtab", + "range": [ + 13, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 9, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "resolvedKey": [ + "arr", + 0, + "subtab" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "val", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + } + ], + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + } + ], + "range": [ + 8, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "resolvedKey": [ + "arr", + 1 + ], + "body": [], + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "subtab", + "range": [ + 41, + 47 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 37, + 47 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "resolvedKey": [ + "arr", + 1, + "subtab" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "val", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "range": [ + 36, + 54 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "range": [ + 0, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 2, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 9, + 12 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "subtab", + "range": [ + 13, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "val", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "subtab", + "range": [ + 41, + 47 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "val", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "comments": [], + "range": [ + 0, + 55 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-subtables-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-subtables-value.json new file mode 100644 index 0000000..9723816 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-subtables-value.json @@ -0,0 +1,14 @@ +{ + "arr": [ + { + "subtab": { + "val": 1 + } + }, + { + "subtab": { + "val": 2 + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/array-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/bool-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/bool-output.json new file mode 100644 index 0000000..004ba92 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/bool-output.json @@ -0,0 +1,281 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + } + ], + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 5, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "TOMLValue", + "kind": "boolean", + "value": false, + "range": [ + 11, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 4, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "range": [ + 0, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "range": [ + 0, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "a", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 5, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Boolean", + "value": "false", + "boolean": false, + "range": [ + 11, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "comments": [], + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/bool-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/bool-value.json new file mode 100644 index 0000000..62c74cb --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/bool-value.json @@ -0,0 +1,6 @@ +{ + "a": [ + true, + false + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/empty-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-empty-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/empty-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-hetergeneous-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/hetergeneous-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-hetergeneous-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/hetergeneous-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-hetergeneous-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/hetergeneous-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-hetergeneous-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/hetergeneous-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-arrays-and-ints-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-array-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-arrays-and-ints-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-array-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-arrays-and-ints-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-array-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-arrays-and-ints-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-array-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-ints-and-floats-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-float-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-ints-and-floats-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-float-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-ints-and-floats-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-float-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-ints-and-floats-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-float-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-strings-and-ints-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-string-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-strings-and-ints-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-string-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-strings-and-ints-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-string-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/invalid/array-mixed-types-strings-and-ints-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-int-string-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-string-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-string-table-output.json new file mode 100644 index 0000000..a93e5dc --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-string-table-output.json @@ -0,0 +1,1262 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "contributors", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "Foo Bar ", + "style": "basic", + "multiline": false, + "range": [ + 19, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Baz Qux", + "style": "basic", + "multiline": false, + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 52, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "email", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + ], + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "bazqux@example.com", + "style": "basic", + "multiline": false, + "range": [ + 78, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + "range": [ + 70, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "url", + "range": [ + 100, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 52 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "range": [ + 100, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 52 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "https://example.com/bazqux", + "style": "basic", + "multiline": false, + "range": [ + 106, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 86 + } + } + }, + "range": [ + 100, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 52 + }, + "end": { + "line": 3, + "column": 86 + } + } + } + ], + "range": [ + 50, + 136 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 88 + } + } + } + ], + "range": [ + 15, + 138 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + "range": [ + 0, + 138 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "mixed", + "range": [ + 466, + 471 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + } + ], + "range": [ + 466, + 471 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "k", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 11 + } + } + } + ], + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 478, + 481 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "range": [ + 476, + 481 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + ], + "range": [ + 475, + 482 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "b", + "style": "basic", + "multiline": false, + "range": [ + 484, + 487 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 489, + 490 + ], + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + ], + "range": [ + 474, + 491 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "range": [ + 466, + 491 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 25 + } + } + } + ], + "range": [ + 0, + 491 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 25 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "contributors", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"Foo Bar \"", + "string": "Foo Bar ", + "range": [ + 19, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"Baz Qux\"", + "string": "Baz Qux", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "email", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": "BasicString", + "value": "\"bazqux@example.com\"", + "string": "bazqux@example.com", + "range": [ + 78, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 50 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + { + "type": "Bare", + "value": "url", + "range": [ + 100, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 52 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 56 + }, + "end": { + "line": 3, + "column": 57 + } + } + }, + { + "type": "BasicString", + "value": "\"https://example.com/bazqux\"", + "string": "https://example.com/bazqux", + "range": [ + 106, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 86 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 3, + "column": 87 + }, + "end": { + "line": 3, + "column": 88 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 137, + 138 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "mixed", + "range": [ + 466, + 471 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 472, + 473 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 474, + 475 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 475, + 476 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "k", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"a\"", + "string": "a", + "range": [ + 478, + 481 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 482, + 483 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + { + "type": "BasicString", + "value": "\"b\"", + "string": "b", + "range": [ + 484, + 487 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 487, + 488 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 22 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 489, + 490 + ], + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 490, + 491 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 25 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Start with a table as the first element. This tests a case that some libraries", + "range": [ + 140, + 220 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 80 + } + } + }, + { + "type": "Block", + "value": " might have where they will check if the first entry is a table/map/hash/assoc", + "range": [ + 221, + 300 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 79 + } + } + }, + { + "type": "Block", + "value": " array and then encode it as a table array. This was a reasonable thing to do", + "range": [ + 301, + 379 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 78 + } + } + }, + { + "type": "Block", + "value": " before TOML 1.0 since arrays could only contain one type, but now it's no", + "range": [ + 380, + 455 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 75 + } + } + }, + { + "type": "Block", + "value": " longer.", + "range": [ + 456, + 465 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 0, + 492 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-string-table-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-string-table-value.json new file mode 100644 index 0000000..6dfde97 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/mixed-string-table-value.json @@ -0,0 +1,17 @@ +{ + "contributors": [ + "Foo Bar ", + { + "name": "Baz Qux", + "email": "bazqux@example.com", + "url": "https://example.com/bazqux" + } + ], + "mixed": [ + { + "k": "a" + }, + "b", + 1 + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-double-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-double-output.json new file mode 100644 index 0000000..69f4086 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-double-output.json @@ -0,0 +1,618 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nest", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "range": [ + 23, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "range": [ + 10, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + ], + "range": [ + 7, + 39 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "range": [ + 0, + 39 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + ], + "range": [ + 0, + 39 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "nest", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"a\"", + "string": "a", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + ], + "comments": [], + "range": [ + 0, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-double-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-double-value.json new file mode 100644 index 0000000..e74f8f0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-double-value.json @@ -0,0 +1,16 @@ +{ + "nest": [ + [ + [ + "a" + ], + [ + 1, + 2, + [ + 3 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/nested-inline-table-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-inline-table-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/nested-inline-table-array-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-inline-table-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/nested-inline-table-array-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-inline-table-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/nested-inline-table-array-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-inline-table-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-nested-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-nested-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-nested-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/arrays-nested-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nested-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-nospaces-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nospaces-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-nospaces-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nospaces-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-nospaces-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nospaces-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-nospaces-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/nospaces-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/open-parent-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/open-parent-table-output.json new file mode 100644 index 0000000..d173d77 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/open-parent-table-output.json @@ -0,0 +1,695 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "parent-table", + "range": [ + 2, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 18 + } + } + } + ], + "range": [ + 2, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "resolvedKey": [ + "parent-table", + "arr", + 0 + ], + "body": [], + "range": [ + 0, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "parent-table", + "range": [ + 23, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 36, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 23, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "resolvedKey": [ + "parent-table", + "arr", + 1 + ], + "body": [], + "range": [ + 21, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "parent-table", + "range": [ + 43, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "range": [ + 43, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "resolvedKey": [ + "parent-table" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "not-arr", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + ], + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 57, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 42, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 0, + 68 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "parent-table", + "range": [ + 2, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "parent-table", + "range": [ + 23, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 36, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "parent-table", + "range": [ + 43, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "not-arr", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "comments": [], + "range": [ + 0, + 69 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/open-parent-table-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/open-parent-table-value.json new file mode 100644 index 0000000..81246a4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/open-parent-table-value.json @@ -0,0 +1,9 @@ +{ + "parent-table": { + "arr": [ + {}, + {} + ], + "not-arr": 1 + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-2-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-2-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-2-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-2-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-2-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-2-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-quote-comma-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-quote-comma-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-2-output.json new file mode 100644 index 0000000..c0ecc79 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-2-output.json @@ -0,0 +1,285 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "title", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "Client: XXXX,\nJob: XXXX", + "style": "basic", + "multiline": true, + "range": [ + 10, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "Code: XXXX", + "style": "basic", + "multiline": false, + "range": [ + 41, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "range": [ + 8, + 55 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + "range": [ + 0, + 55 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "range": [ + 0, + 55 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "title", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"Client: XXXX,\nJob: XXXX\"\"\"", + "string": "Client: XXXX,\nJob: XXXX", + "range": [ + 10, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"Code: XXXX\"", + "string": "Code: XXXX", + "range": [ + 41, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "comments": [], + "range": [ + 0, + 56 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-2-value.json new file mode 100644 index 0000000..3f25a2c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-2-value.json @@ -0,0 +1,6 @@ +{ + "title": [ + "Client: XXXX,\nJob: XXXX", + "Code: XXXX" + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-with-comma-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-with-comma-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-with-comma-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-string-with-comma-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/string-with-comma-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/strings-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/strings-output.json new file mode 100644 index 0000000..3622691 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/strings-output.json @@ -0,0 +1,401 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "string_array", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "all", + "style": "basic", + "multiline": false, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "strings", + "style": "literal", + "multiline": false, + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "are the same", + "style": "basic", + "multiline": true, + "range": [ + 35, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 53 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "type", + "style": "literal", + "multiline": true, + "range": [ + 55, + 65 + ], + "loc": { + "start": { + "line": 1, + "column": 55 + }, + "end": { + "line": 1, + "column": 65 + } + } + } + ], + "range": [ + 15, + 66 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 66 + } + } + }, + "range": [ + 0, + 66 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 66 + } + } + } + ], + "range": [ + 0, + 66 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 66 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "string_array", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"all\"", + "string": "all", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "LiteralString", + "value": "'strings'", + "string": "strings", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"are the same\"\"\"", + "string": "are the same", + "range": [ + 35, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 53 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 53 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''type'''", + "string": "type", + "range": [ + 55, + 65 + ], + "loc": { + "start": { + "line": 1, + "column": 55 + }, + "end": { + "line": 1, + "column": 65 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 1, + "column": 65 + }, + "end": { + "line": 1, + "column": 66 + } + } + } + ], + "comments": [], + "range": [ + 0, + 67 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/strings-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/strings-value.json new file mode 100644 index 0000000..43bbd6a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/strings-value.json @@ -0,0 +1,8 @@ +{ + "string_array": [ + "all", + "strings", + "are the same", + "type" + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-table-array-string-backslash-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/table-array-string-backslash-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-table-array-string-backslash-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/table-array-string-backslash-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-table-array-string-backslash-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/table-array-string-backslash-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array-table-array-string-backslash-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/table-array-string-backslash-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/trailing-comma-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/trailing-comma-output.json new file mode 100644 index 0000000..fea22ed --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/trailing-comma-output.json @@ -0,0 +1,964 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr-1", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + } + ], + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr-2", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + } + ], + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 14, + 28 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr-3", + "range": [ + 30, + 35 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 30, + 35 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + ], + "range": [ + 38, + 43 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "range": [ + 30, + 43 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr-4", + "range": [ + 45, + 50 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "range": [ + 45, + 50 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 5, + "number": "5", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 6, + "number": "6", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + ], + "range": [ + 53, + 64 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + "range": [ + 45, + 64 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + } + ], + "range": [ + 0, + 64 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "arr-1", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "arr-2", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "arr-3", + "range": [ + 30, + 35 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "arr-4", + "range": [ + 45, + 50 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "5", + "number": 5, + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "6", + "number": 6, + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + } + ], + "comments": [], + "range": [ + 0, + 65 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/trailing-comma-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/trailing-comma-value.json new file mode 100644 index 0000000..ef86e27 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/array/trailing-comma-value.json @@ -0,0 +1,16 @@ +{ + "arr-1": [ + 1 + ], + "arr-2": [ + 2, + 3 + ], + "arr-3": [ + 4 + ], + "arr-4": [ + 5, + 6 + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool/bool-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool/bool-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool/bool-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/bool/bool-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/after-literal-no-ws-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/after-literal-no-ws-output.json new file mode 100644 index 0000000..192c2ad --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/after-literal-no-ws-output.json @@ -0,0 +1,629 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "inf", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# Infinity #", + "number": "inf", + "range": [ + 4, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nan", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "nan", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "true", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 43, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "false", + "range": [ + 53, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + } + ], + "range": [ + 53, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": false, + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 53, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 0, + 64 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "inf", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Float", + "value": "inf", + "number": "# Infinity #", + "range": [ + 4, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "nan", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Float", + "value": "nan", + "number": "# NaN #", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "true", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 43, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "false", + "range": [ + 53, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Boolean", + "value": "false", + "boolean": false, + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": "infinity", + "range": [ + 7, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Block", + "value": "not a number", + "range": [ + 24, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Block", + "value": "true", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Block", + "value": "false", + "range": [ + 64, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "range": [ + 0, + 71 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/after-literal-no-ws-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/after-literal-no-ws-value.json new file mode 100644 index 0000000..1306ce7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/after-literal-no-ws-value.json @@ -0,0 +1,6 @@ +{ + "inf": "# Infinity #", + "nan": "# NaN #", + "true": true, + "false": false +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof2-output.json similarity index 98% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof2-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof2-output.json index 37e0fa7..6f6b897 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof2-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof2-output.json @@ -194,7 +194,7 @@ ], "range": [ 0, - 84 + 85 ], "loc": { "start": { @@ -202,8 +202,8 @@ "column": 0 }, "end": { - "line": 2, - "column": 54 + "line": 3, + "column": 0 } } } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof2-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-at-eof2-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/at-eof2-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-everywhere-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/everywhere-output.json similarity index 71% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-everywhere-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/everywhere-output.json index 22988dd..b4e4fa4 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-everywhere-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/everywhere-output.json @@ -234,11 +234,159 @@ "column": 1 } } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dt", + "range": [ + 521, + 523 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 2 + } + } + } + ], + "range": [ + 521, + 523 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1979-05-27T14:32:12.000Z", + "datetime": "1979-05-27T07:32:12-07:00", + "range": [ + 526, + 551 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 30 + } + } + }, + "range": [ + 521, + 551 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + } + } + ], + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "1979-05-27T00:00:00.000Z", + "datetime": "1979-05-27", + "range": [ + 561, + 571 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 14 + } + } + }, + "range": [ + 557, + 571 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 14 + } + } } ], "range": [ 81, - 438 + 571 ], "loc": { "start": { @@ -246,15 +394,15 @@ "column": 0 }, "end": { - "line": 24, - "column": 1 + "line": 28, + "column": 14 } } } ], "range": [ 81, - 438 + 571 ], "loc": { "start": { @@ -262,8 +410,8 @@ "column": 0 }, "end": { - "line": 24, - "column": 1 + "line": 28, + "column": 14 } } } @@ -524,6 +672,114 @@ "column": 1 } } + }, + { + "type": "Bare", + "value": "dt", + "range": [ + 521, + 523 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 524, + 525 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1979-05-27T07:32:12-07:00", + "range": [ + 526, + 551 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 559, + 560 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + { + "type": "LocalDate", + "value": "1979-05-27", + "range": [ + 561, + 571 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 14 + } + } } ], "comments": [ @@ -922,11 +1178,65 @@ "column": 18 } } + }, + { + "type": "Block", + "value": " Make sure the space between the datetime and \"#\" isn't lexed.", + "range": [ + 457, + 520 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 63 + } + } + }, + { + "type": "Block", + "value": " c", + "range": [ + 553, + 556 + ], + "loc": { + "start": { + "line": 27, + "column": 32 + }, + "end": { + "line": 27, + "column": 35 + } + } + }, + { + "type": "Block", + "value": " Comment", + "range": [ + 572, + 581 + ], + "loc": { + "start": { + "line": 28, + "column": 15 + }, + "end": { + "line": 28, + "column": 24 + } + } } ], "range": [ 0, - 456 + 582 ], "loc": { "start": { @@ -934,7 +1244,7 @@ "column": 0 }, "end": { - "line": 25, + "line": 29, "column": 0 } } diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/everywhere-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/everywhere-value.json new file mode 100644 index 0000000..0dd4a55 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/everywhere-value.json @@ -0,0 +1,11 @@ +{ + "group": { + "answer": 42, + "more": [ + 42, + 42 + ], + "dt": "1979-05-27T14:32:12.000Z", + "d": "1979-05-27T00:00:00.000Z" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/noeol-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/noeol-output.json new file mode 100644 index 0000000..dfc8d47 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/noeol-output.json @@ -0,0 +1,59 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [], + "range": [ + 0, + 0 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + } + } + ], + "sourceType": "module", + "tokens": [], + "comments": [ + { + "type": "Block", + "value": " single comment without any eol characters", + "range": [ + 0, + 43 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + } + } + ], + "range": [ + 0, + 43 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/noeol-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/noeol-value.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/noeol-value.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/nonascii-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/nonascii-output.json new file mode 100644 index 0000000..30229cd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/nonascii-output.json @@ -0,0 +1,59 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [], + "range": [ + 0, + 0 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 0 + } + } + } + ], + "sourceType": "module", + "tokens": [], + "comments": [ + { + "type": "Block", + "value": " ~ € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 0, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + "range": [ + 0, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/nonascii-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/nonascii-value.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/nonascii-value.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/tricky-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/tricky-output.json new file mode 100644 index 0000000..64d01b8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/tricky-output.json @@ -0,0 +1,3203 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "section", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "resolvedKey": [ + "section" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + } + ], + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "11", + "style": "basic", + "multiline": false, + "range": [ + 47, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 41, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "two", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "22#", + "style": "basic", + "multiline": false, + "range": [ + 62, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "three", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "#", + "style": "literal", + "multiline": false, + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "range": [ + 68, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "four", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "# no comment\n# nor this\n#also not comment", + "style": "basic", + "multiline": true, + "range": [ + 88, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "range": [ + 81, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "five", + "range": [ + 148, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "range": [ + 148, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 5.5, + "number": "5.5", + "range": [ + 155, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "range": [ + 148, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "six", + "range": [ + 162, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + } + ], + "range": [ + 162, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 6, + "number": "6", + "range": [ + 168, + 169 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "range": [ + 162, + 169 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "8", + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + } + ], + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "eight", + "style": "basic", + "multiline": false, + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "range": [ + 172, + 183 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ten", + "range": [ + 195, + 198 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 3 + } + } + } + ], + "range": [ + 195, + 198 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 1000, + "number": "10e2", + "range": [ + 201, + 205 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "range": [ + 195, + 205 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "eleven", + "range": [ + 208, + 214 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 6 + } + } + } + ], + "range": [ + 208, + 214 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 11.1, + "number": "1.11e1", + "range": [ + 217, + 223 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "range": [ + 208, + 223 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 15 + } + } + } + ], + "range": [ + 0, + 223 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "hash#tag", + "style": "basic", + "multiline": false, + "range": [ + 229, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + ], + "range": [ + 229, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "resolvedKey": [ + "hash#tag" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "#!", + "style": "basic", + "multiline": false, + "range": [ + 241, + 245 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + } + ], + "range": [ + 241, + 245 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "hash bang", + "style": "basic", + "multiline": false, + "range": [ + 248, + 259 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "range": [ + 241, + 259 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr3", + "range": [ + 260, + 264 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 260, + 264 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "#", + "style": "basic", + "multiline": false, + "range": [ + 269, + 272 + ], + "loc": { + "start": { + "line": 20, + "column": 9 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "#", + "style": "literal", + "multiline": false, + "range": [ + 274, + 277 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 17 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "###", + "style": "basic", + "multiline": true, + "range": [ + 279, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 28 + } + } + } + ], + "range": [ + 267, + 290 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "range": [ + 260, + 290 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr4", + "range": [ + 291, + 295 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 291, + 295 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 4 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 310, + 311 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + } + ], + "range": [ + 298, + 326 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 25, + "column": 3 + } + } + }, + "range": [ + 291, + 326 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 25, + "column": 3 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr5", + "range": [ + 327, + 331 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 4 + } + } + } + ], + "range": [ + 327, + 331 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "#", + "style": "basic", + "multiline": false, + "range": [ + 347, + 350 + ], + "loc": { + "start": { + "line": 27, + "column": 1 + }, + "end": { + "line": 27, + "column": 4 + } + } + } + ], + "range": [ + 346, + 351 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 5 + } + } + } + ], + "range": [ + 337, + 352 + ], + "loc": { + "start": { + "line": 26, + "column": 10 + }, + "end": { + "line": 27, + "column": 6 + } + } + } + ], + "range": [ + 336, + 353 + ], + "loc": { + "start": { + "line": 26, + "column": 9 + }, + "end": { + "line": 27, + "column": 7 + } + } + } + ], + "range": [ + 335, + 354 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 27, + "column": 8 + } + } + } + ], + "range": [ + 334, + 358 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + "range": [ + 327, + 358 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl1", + "range": [ + 359, + 363 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 4 + } + } + } + ], + "range": [ + 359, + 363 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 4 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "#", + "style": "basic", + "multiline": false, + "range": [ + 368, + 371 + ], + "loc": { + "start": { + "line": 29, + "column": 9 + }, + "end": { + "line": 29, + "column": 12 + } + } + } + ], + "range": [ + 368, + 371 + ], + "loc": { + "start": { + "line": 29, + "column": 9 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "}#", + "style": "literal", + "multiline": false, + "range": [ + 374, + 378 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 19 + } + } + }, + "range": [ + 368, + 378 + ], + "loc": { + "start": { + "line": 29, + "column": 9 + }, + "end": { + "line": 29, + "column": 19 + } + } + } + ], + "range": [ + 366, + 379 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 20 + } + } + }, + "range": [ + 359, + 379 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 20 + } + } + } + ], + "range": [ + 228, + 379 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 29, + "column": 20 + } + } + } + ], + "range": [ + 0, + 379 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 29, + "column": 20 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "section", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"11\"", + "string": "11", + "range": [ + 47, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "two", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"22#\"", + "string": "22#", + "range": [ + 62, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "three", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "LiteralString", + "value": "'#'", + "string": "#", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "four", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"# no comment\n# nor this\n#also not comment\"\"\"", + "string": "# no comment\n# nor this\n#also not comment", + "range": [ + 88, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "five", + "range": [ + 148, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "5.5", + "number": 5.5, + "range": [ + 155, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "six", + "range": [ + 162, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "6", + "number": 6, + "range": [ + 168, + 169 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "8", + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"eight\"", + "string": "eight", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "ten", + "range": [ + 195, + 198 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "10e2", + "number": 1000, + "range": [ + 201, + 205 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "eleven", + "range": [ + 208, + 214 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "Float", + "value": "1.11e1", + "number": 11.1, + "range": [ + 217, + 223 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\"hash#tag\"", + "string": "hash#tag", + "range": [ + 229, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"#!\"", + "string": "#!", + "range": [ + 241, + 245 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"hash bang\"", + "string": "hash bang", + "range": [ + 248, + 259 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "arr3", + "range": [ + 260, + 264 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"#\"", + "string": "#", + "range": [ + 269, + 272 + ], + "loc": { + "start": { + "line": 20, + "column": 9 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 20, + "column": 12 + }, + "end": { + "line": 20, + "column": 13 + } + } + }, + { + "type": "LiteralString", + "value": "'#'", + "string": "#", + "range": [ + 274, + 277 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 277, + 278 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"###\"\"\"", + "string": "###", + "range": [ + 279, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 20, + "column": 29 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "arr4", + "range": [ + 291, + 295 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 21, + "column": 5 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 298, + 299 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 310, + 311 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 323, + 324 + ], + "loc": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 325, + 326 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "arr5", + "range": [ + 327, + 331 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 335, + 336 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 336, + 337 + ], + "loc": { + "start": { + "line": 26, + "column": 9 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 337, + 338 + ], + "loc": { + "start": { + "line": 26, + "column": 10 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 346, + 347 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\"#\"", + "string": "#", + "range": [ + 347, + 350 + ], + "loc": { + "start": { + "line": 27, + "column": 1 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 350, + 351 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 351, + 352 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 352, + 353 + ], + "loc": { + "start": { + "line": 27, + "column": 6 + }, + "end": { + "line": 27, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 353, + 354 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 357, + 358 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "tbl1", + "range": [ + 359, + 363 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 364, + 365 + ], + "loc": { + "start": { + "line": 29, + "column": 5 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"#\"", + "string": "#", + "range": [ + 368, + 371 + ], + "loc": { + "start": { + "line": 29, + "column": 9 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 372, + 373 + ], + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + { + "type": "LiteralString", + "value": "'}#'", + "string": "}#", + "range": [ + 374, + 378 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 20 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": "attached comment", + "range": [ + 9, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Block", + "value": "[notsection]", + "range": [ + 27, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Block", + "value": "cmt", + "range": [ + 51, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Block", + "value": "is_comment", + "range": [ + 135, + 146 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 31 + } + } + }, + { + "type": "Block", + "value": "66", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + { + "type": "Block", + "value": "7", + "range": [ + 169, + 171 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "Block", + "value": "nine = 99", + "range": [ + 184, + 194 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "Block", + "value": "1", + "range": [ + 205, + 207 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + { + "type": "Block", + "value": "23", + "range": [ + 223, + 226 + ], + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "Block", + "value": " 9, 9,", + "range": [ + 302, + 309 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 18 + } + } + }, + { + "type": "Block", + "value": ",9", + "range": [ + 311, + 314 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + { + "type": "Block", + "value": "9", + "range": [ + 316, + 318 + ], + "loc": { + "start": { + "line": 23, + "column": 1 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "Block", + "value": "]", + "range": [ + 320, + 322 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + { + "type": "Block", + "value": "[\"#\"],", + "range": [ + 338, + 345 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + { + "type": "Block", + "value": "]", + "range": [ + 354, + 356 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 10 + } + } + }, + { + "type": "Block", + "value": "}}", + "range": [ + 379, + 382 + ], + "loc": { + "start": { + "line": 29, + "column": 20 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + ], + "range": [ + 0, + 385 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/tricky-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/tricky-value.json new file mode 100644 index 0000000..e9cc9c6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comment/tricky-value.json @@ -0,0 +1,41 @@ +{ + "section": { + "8": "eight", + "one": "11", + "two": "22#", + "three": "#", + "four": "# no comment\n# nor this\n#also not comment", + "five": 5.5, + "six": 6, + "ten": 1000, + "eleven": 11.1 + }, + "hash#tag": { + "#!": "hash bang", + "arr3": [ + "#", + "#", + "###" + ], + "arr4": [ + 1, + 2, + 3, + 4 + ], + "arr5": [ + [ + [ + [ + [ + "#" + ] + ] + ] + ] + ], + "tbl1": { + "#": "}#" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-everywhere-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-everywhere-value.json deleted file mode 100644 index 8f9d7f0..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/comments-everywhere-value.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "group": { - "answer": 42, - "more": [ - 42, - 42 - ] - } -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-timezone-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-timezone-value.json deleted file mode 100644 index b0725e7..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-timezone-value.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "bestdayever": "2017-06-06T17:34:56.000Z" -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-value.json deleted file mode 100644 index 84f3c57..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-value.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "bestdayever": "1987-07-05T17:45:00.000Z", - "numoffset": "1977-06-28T12:32:00.000Z", - "milliseconds": "1977-12-21T03:32:00.555Z" -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/datetime-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/datetime-output.json new file mode 100644 index 0000000..917d988 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/datetime-output.json @@ -0,0 +1,298 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "space", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T17:45:00.000Z", + "datetime": "1987-07-05 17:45:00Z", + "range": [ + 8, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "range": [ + 0, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lower", + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T17:45:00.000Z", + "datetime": "1987-07-05t17:45:00z", + "range": [ + 37, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 29, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "space", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05 17:45:00Z", + "range": [ + 8, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "Bare", + "value": "lower", + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05t17:45:00z", + "range": [ + 37, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "comments": [], + "range": [ + 0, + 58 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/datetime-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/datetime-value.json new file mode 100644 index 0000000..1348594 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/datetime-value.json @@ -0,0 +1,4 @@ +{ + "space": "1987-07-05T17:45:00.000Z", + "lower": "1987-07-05T17:45:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/edge-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/edge-output.json new file mode 100644 index 0000000..9c25e0f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/edge-output.json @@ -0,0 +1,810 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "first-offset", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "0001-01-01T00:00:00.000Z", + "datetime": "0001-01-01 00:00:00Z", + "range": [ + 15, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + "range": [ + 0, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "first-local", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date-time", + "value": "0000-12-31T14:41:01.000Z", + "datetime": "0001-01-01 00:00:00", + "range": [ + 51, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 36, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "first-date", + "range": [ + 71, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "range": [ + 71, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "0001-01-01T00:00:00.000Z", + "datetime": "0001-01-01", + "range": [ + 86, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 71, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "last-offset", + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "9999-12-31T23:59:59.000Z", + "datetime": "9999-12-31 23:59:59Z", + "range": [ + 112, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "range": [ + 98, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "last-local", + "range": [ + 133, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + ], + "range": [ + 133, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date-time", + "value": "9999-12-31T14:59:59.000Z", + "datetime": "9999-12-31 23:59:59", + "range": [ + 147, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 133, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "last-date", + "range": [ + 167, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "range": [ + 167, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "9999-12-31T00:00:00.000Z", + "datetime": "9999-12-31", + "range": [ + 181, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 167, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + ], + "range": [ + 0, + 191 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "first-offset", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "OffsetDateTime", + "value": "0001-01-01 00:00:00Z", + "range": [ + 15, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + { + "type": "Bare", + "value": "first-local", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "LocalDateTime", + "value": "0001-01-01 00:00:00", + "range": [ + 51, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "Bare", + "value": "first-date", + "range": [ + 71, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "LocalDate", + "value": "0001-01-01", + "range": [ + 86, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "last-offset", + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "OffsetDateTime", + "value": "9999-12-31 23:59:59Z", + "range": [ + 112, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + { + "type": "Bare", + "value": "last-local", + "range": [ + 133, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "LocalDateTime", + "value": "9999-12-31 23:59:59", + "range": [ + 147, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Bare", + "value": "last-date", + "range": [ + 167, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "LocalDate", + "value": "9999-12-31", + "range": [ + 181, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + ], + "comments": [], + "range": [ + 0, + 192 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/edge-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/edge-value.json new file mode 100644 index 0000000..0b86c48 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/edge-value.json @@ -0,0 +1,8 @@ +{ + "first-offset": "0001-01-01T00:00:00.000Z", + "first-local": "0000-12-31T14:41:01.000Z", + "first-date": "0001-01-01T00:00:00.000Z", + "last-offset": "9999-12-31T23:59:59.000Z", + "last-local": "9999-12-31T14:59:59.000Z", + "last-date": "9999-12-31T00:00:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/leap-year-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/leap-year-output.json new file mode 100644 index 0000000..d5ee642 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/leap-year-output.json @@ -0,0 +1,810 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2000-datetime", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "2000-02-29T15:15:15.000Z", + "datetime": "2000-02-29 15:15:15Z", + "range": [ + 22, + 42 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 42 + } + } + }, + "range": [ + 0, + 42 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2000-datetime-local", + "range": [ + 43, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "range": [ + 43, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date-time", + "value": "2000-02-29T06:15:15.000Z", + "datetime": "2000-02-29 15:15:15", + "range": [ + 65, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "range": [ + 43, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2000-date", + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "2000-02-29T00:00:00.000Z", + "datetime": "2000-02-29", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 85, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2024-datetime", + "range": [ + 119, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 119, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "2024-02-29T15:15:15.000Z", + "datetime": "2024-02-29 15:15:15Z", + "range": [ + 141, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 42 + } + } + }, + "range": [ + 119, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 42 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2024-datetime-local", + "range": [ + 162, + 181 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 162, + 181 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date-time", + "value": "2024-02-29T06:15:15.000Z", + "datetime": "2024-02-29 15:15:15", + "range": [ + 184, + 203 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + "range": [ + 162, + 203 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2024-date", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "2024-02-29T00:00:00.000Z", + "datetime": "2024-02-29", + "range": [ + 226, + 236 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 32 + } + } + }, + "range": [ + 204, + 236 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "range": [ + 0, + 236 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "2000-datetime", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "OffsetDateTime", + "value": "2000-02-29 15:15:15Z", + "range": [ + 22, + 42 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 42 + } + } + }, + { + "type": "Bare", + "value": "2000-datetime-local", + "range": [ + 43, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "LocalDateTime", + "value": "2000-02-29 15:15:15", + "range": [ + 65, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Bare", + "value": "2000-date", + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "LocalDate", + "value": "2000-02-29", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Bare", + "value": "2024-datetime", + "range": [ + 119, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "OffsetDateTime", + "value": "2024-02-29 15:15:15Z", + "range": [ + 141, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 42 + } + } + }, + { + "type": "Bare", + "value": "2024-datetime-local", + "range": [ + 162, + 181 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "LocalDateTime", + "value": "2024-02-29 15:15:15", + "range": [ + 184, + 203 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + { + "type": "Bare", + "value": "2024-date", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 224, + 225 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "LocalDate", + "value": "2024-02-29", + "range": [ + 226, + 236 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "comments": [], + "range": [ + 0, + 237 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/leap-year-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/leap-year-value.json new file mode 100644 index 0000000..4f827cb --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/leap-year-value.json @@ -0,0 +1,8 @@ +{ + "2000-datetime": "2000-02-29T15:15:15.000Z", + "2000-datetime-local": "2000-02-29T06:15:15.000Z", + "2000-date": "2000-02-29T00:00:00.000Z", + "2024-datetime": "2024-02-29T15:15:15.000Z", + "2024-datetime-local": "2024-02-29T06:15:15.000Z", + "2024-date": "2024-02-29T00:00:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-timezone-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-date-output.json similarity index 87% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-timezone-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-date-output.json index 3bae502..f9999b8 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-timezone-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-date-output.json @@ -45,12 +45,12 @@ }, "value": { "type": "TOMLValue", - "kind": "offset-date-time", - "value": "2017-06-06T17:34:56.000Z", - "datetime": "2017-06-06T12:34:56-05:00", + "kind": "local-date", + "value": "1987-07-05T00:00:00.000Z", + "datetime": "1987-07-05", "range": [ 14, - 39 + 24 ], "loc": { "start": { @@ -59,13 +59,13 @@ }, "end": { "line": 1, - "column": 39 + "column": 24 } } }, "range": [ 0, - 39 + 24 ], "loc": { "start": { @@ -74,14 +74,14 @@ }, "end": { "line": 1, - "column": 39 + "column": 24 } } } ], "range": [ 0, - 39 + 24 ], "loc": { "start": { @@ -90,7 +90,7 @@ }, "end": { "line": 1, - "column": 39 + "column": 24 } } } @@ -134,11 +134,11 @@ } }, { - "type": "OffsetDateTime", - "value": "2017-06-06T12:34:56-05:00", + "type": "LocalDate", + "value": "1987-07-05", "range": [ 14, - 39 + 24 ], "loc": { "start": { @@ -147,7 +147,7 @@ }, "end": { "line": 1, - "column": 39 + "column": 24 } } } @@ -155,7 +155,7 @@ "comments": [], "range": [ 0, - 40 + 25 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-date-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-date-value.json new file mode 100644 index 0000000..70d5e0a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-date-value.json @@ -0,0 +1,3 @@ +{ + "bestdayever": "1987-07-05T00:00:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/exponent-part-float-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-output.json similarity index 76% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/exponent-part-float-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-output.json index 10f1356..f83072e 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/exponent-part-float-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "million", + "name": "local", "range": [ 0, - 7 + 5 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 7 + "column": 5 } } } ], "range": [ 0, - 7 + 5 ], "loc": { "start": { @@ -39,33 +39,33 @@ }, "end": { "line": 1, - "column": 7 + "column": 5 } } }, "value": { "type": "TOMLValue", - "kind": "float", - "value": 1000000, - "number": "1e6", + "kind": "local-date-time", + "value": "1987-07-05T08:45:00.000Z", + "datetime": "1987-07-05T17:45:00", "range": [ - 10, - 13 + 8, + 27 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 8 }, "end": { "line": 1, - "column": 13 + "column": 27 } } }, "range": [ 0, - 13 + 27 ], "loc": { "start": { @@ -74,7 +74,7 @@ }, "end": { "line": 1, - "column": 13 + "column": 27 } } }, @@ -85,10 +85,10 @@ "keys": [ { "type": "TOMLBare", - "name": "minustenth", + "name": "milli", "range": [ - 14, - 24 + 28, + 33 ], "loc": { "start": { @@ -97,14 +97,14 @@ }, "end": { "line": 2, - "column": 10 + "column": 5 } } } ], "range": [ - 14, - 24 + 28, + 33 ], "loc": { "start": { @@ -113,33 +113,33 @@ }, "end": { "line": 2, - "column": 10 + "column": 5 } } }, "value": { "type": "TOMLValue", - "kind": "float", - "value": -0.1, - "number": "-1E-1", + "kind": "local-date-time", + "value": "1977-12-21T01:32:00.555Z", + "datetime": "1977-12-21T10:32:00.555", "range": [ - 27, - 32 + 36, + 59 ], "loc": { "start": { "line": 2, - "column": 13 + "column": 8 }, "end": { "line": 2, - "column": 18 + "column": 31 } } }, "range": [ - 14, - 32 + 28, + 59 ], "loc": { "start": { @@ -148,7 +148,7 @@ }, "end": { "line": 2, - "column": 18 + "column": 31 } } }, @@ -159,10 +159,10 @@ "keys": [ { "type": "TOMLBare", - "name": "beast", + "name": "space", "range": [ - 33, - 38 + 60, + 65 ], "loc": { "start": { @@ -177,8 +177,8 @@ } ], "range": [ - 33, - 38 + 60, + 65 ], "loc": { "start": { @@ -193,12 +193,12 @@ }, "value": { "type": "TOMLValue", - "kind": "float", - "value": 666, - "number": "6.66E2", + "kind": "local-date-time", + "value": "1987-07-05T08:45:00.000Z", + "datetime": "1987-07-05 17:45:00", "range": [ - 41, - 47 + 68, + 87 ], "loc": { "start": { @@ -207,13 +207,13 @@ }, "end": { "line": 3, - "column": 14 + "column": 27 } } }, "range": [ - 33, - 47 + 60, + 87 ], "loc": { "start": { @@ -222,14 +222,14 @@ }, "end": { "line": 3, - "column": 14 + "column": 27 } } } ], "range": [ 0, - 47 + 87 ], "loc": { "start": { @@ -238,7 +238,7 @@ }, "end": { "line": 3, - "column": 14 + "column": 27 } } } @@ -247,10 +247,10 @@ "tokens": [ { "type": "Bare", - "value": "million", + "value": "local", "range": [ 0, - 7 + 5 ], "loc": { "start": { @@ -259,7 +259,7 @@ }, "end": { "line": 1, - "column": 7 + "column": 5 } } }, @@ -267,45 +267,44 @@ "type": "Punctuator", "value": "=", "range": [ - 8, - 9 + 6, + 7 ], "loc": { "start": { "line": 1, - "column": 8 + "column": 6 }, "end": { "line": 1, - "column": 9 + "column": 7 } } }, { - "type": "Float", - "value": "1e6", - "number": 1000000, + "type": "LocalDateTime", + "value": "1987-07-05T17:45:00", "range": [ - 10, - 13 + 8, + 27 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 8 }, "end": { "line": 1, - "column": 13 + "column": 27 } } }, { "type": "Bare", - "value": "minustenth", + "value": "milli", "range": [ - 14, - 24 + 28, + 33 ], "loc": { "start": { @@ -314,7 +313,7 @@ }, "end": { "line": 2, - "column": 10 + "column": 5 } } }, @@ -322,45 +321,44 @@ "type": "Punctuator", "value": "=", "range": [ - 25, - 26 + 34, + 35 ], "loc": { "start": { "line": 2, - "column": 11 + "column": 6 }, "end": { "line": 2, - "column": 12 + "column": 7 } } }, { - "type": "Float", - "value": "-1E-1", - "number": -0.1, + "type": "LocalDateTime", + "value": "1977-12-21T10:32:00.555", "range": [ - 27, - 32 + 36, + 59 ], "loc": { "start": { "line": 2, - "column": 13 + "column": 8 }, "end": { "line": 2, - "column": 18 + "column": 31 } } }, { "type": "Bare", - "value": "beast", + "value": "space", "range": [ - 33, - 38 + 60, + 65 ], "loc": { "start": { @@ -377,8 +375,8 @@ "type": "Punctuator", "value": "=", "range": [ - 39, - 40 + 66, + 67 ], "loc": { "start": { @@ -392,12 +390,11 @@ } }, { - "type": "Float", - "value": "6.66E2", - "number": 666, + "type": "LocalDateTime", + "value": "1987-07-05 17:45:00", "range": [ - 41, - 47 + 68, + 87 ], "loc": { "start": { @@ -406,7 +403,7 @@ }, "end": { "line": 3, - "column": 14 + "column": 27 } } } @@ -414,7 +411,7 @@ "comments": [], "range": [ 0, - 48 + 88 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-time-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-time-output.json new file mode 100644 index 0000000..031f5dd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-time-output.json @@ -0,0 +1,298 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "besttimeever", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-time", + "value": "0000-01-01T17:45:00.000Z", + "datetime": "17:45:00", + "range": [ + 15, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "range": [ + 0, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "milliseconds", + "range": [ + 24, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "range": [ + 24, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-time", + "value": "0000-01-01T10:32:00.555Z", + "datetime": "10:32:00.555", + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + ], + "range": [ + 0, + 51 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "besttimeever", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "LocalTime", + "value": "17:45:00", + "range": [ + 15, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "milliseconds", + "range": [ + 24, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "LocalTime", + "value": "10:32:00.555", + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + ], + "comments": [], + "range": [ + 0, + 52 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-time-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-time-value.json new file mode 100644 index 0000000..d75884b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-time-value.json @@ -0,0 +1,4 @@ +{ + "besttimeever": "0000-01-01T17:45:00.000Z", + "milliseconds": "0000-01-01T10:32:00.555Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-value.json new file mode 100644 index 0000000..e35c699 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/local-value.json @@ -0,0 +1,5 @@ +{ + "local": "1987-07-05T08:45:00.000Z", + "milli": "1977-12-21T01:32:00.555Z", + "space": "1987-07-05T08:45:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/milliseconds-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/milliseconds-output.json new file mode 100644 index 0000000..24e2595 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/milliseconds-output.json @@ -0,0 +1,554 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "utc1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T17:45:56.123Z", + "datetime": "1987-07-05T17:45:56.123Z", + "range": [ + 8, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "range": [ + 0, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "utc2", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T17:45:56.600Z", + "datetime": "1987-07-05T17:45:56.6Z", + "range": [ + 41, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 33, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "wita1", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + } + ], + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T09:45:56.123Z", + "datetime": "1987-07-05T17:45:56.123+08:00", + "range": [ + 72, + 101 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + "range": [ + 64, + 101 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "wita2", + "range": [ + 102, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + } + ], + "range": [ + 102, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T09:45:56.600Z", + "datetime": "1987-07-05T17:45:56.6+08:00", + "range": [ + 110, + 137 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 102, + 137 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "range": [ + 0, + 137 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "utc1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56.123Z", + "range": [ + 8, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + { + "type": "Bare", + "value": "utc2", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56.6Z", + "range": [ + 41, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "wita1", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56.123+08:00", + "range": [ + 72, + 101 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Bare", + "value": "wita2", + "range": [ + 102, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56.6+08:00", + "range": [ + 110, + 137 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "comments": [], + "range": [ + 0, + 138 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/milliseconds-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/milliseconds-value.json new file mode 100644 index 0000000..0f0d45f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/milliseconds-value.json @@ -0,0 +1,6 @@ +{ + "utc1": "1987-07-05T17:45:56.123Z", + "utc2": "1987-07-05T17:45:56.600Z", + "wita1": "1987-07-05T09:45:56.123Z", + "wita2": "1987-07-05T09:45:56.600Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/no-seconds-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/no-seconds-output.json new file mode 100644 index 0000000..47ecd8c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/no-seconds-output.json @@ -0,0 +1 @@ +"Unexpected character@line:2,column:25" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/timezone-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/timezone-output.json new file mode 100644 index 0000000..3d55293 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/timezone-output.json @@ -0,0 +1,573 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "utc", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T17:45:56.000Z", + "datetime": "1987-07-05T17:45:56Z", + "range": [ + 7, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "range": [ + 0, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "pdt", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T22:45:56.000Z", + "datetime": "1987-07-05T17:45:56-05:00", + "range": [ + 35, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 28, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nzst", + "range": [ + 61, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 61, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T05:45:56.000Z", + "datetime": "1987-07-05T17:45:56+12:00", + "range": [ + 68, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 61, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nzdt", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1987-07-05T04:45:56.000Z", + "datetime": "1987-07-05T17:45:56+13:00", + "range": [ + 101, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 94, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 0, + 126 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "utc", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56Z", + "range": [ + 7, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "pdt", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56-05:00", + "range": [ + 35, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + { + "type": "Bare", + "value": "nzst", + "range": [ + 61, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56+12:00", + "range": [ + 68, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Bare", + "value": "nzdt", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1987-07-05T17:45:56+13:00", + "range": [ + 101, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " DST", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 0, + 134 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/timezone-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/timezone-value.json new file mode 100644 index 0000000..56ec1e7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime/timezone-value.json @@ -0,0 +1,6 @@ +{ + "utc": "1987-07-05T17:45:56.000Z", + "pdt": "1987-07-05T22:45:56.000Z", + "nzst": "1987-07-05T05:45:56.000Z", + "nzdt": "1987-07-05T04:45:56.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-file-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-file-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-file-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-file-value.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/empty-file-value.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/exponent-part-float-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/exponent-part-float-value.json deleted file mode 100644 index 7d247f2..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/exponent-part-float-value.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "million": 1000000, - "minustenth": -0.1, - "beast": 666 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-exponent-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/exponent-output.json similarity index 87% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-exponent-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/exponent-output.json index fa6c557..7ea68c0 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-exponent-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/exponent-output.json @@ -521,11 +521,85 @@ "column": 18 } } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "minustenth", + "range": [ + 95, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 10 + } + } + } + ], + "range": [ + 95, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": -0.1, + "number": "-1E-1", + "range": [ + 108, + 113 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "range": [ + 95, + 113 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 18 + } + } } ], "range": [ 0, - 94 + 113 ], "loc": { "start": { @@ -533,7 +607,7 @@ "column": 0 }, "end": { - "line": 7, + "line": 8, "column": 18 } } @@ -925,12 +999,67 @@ "column": 18 } } + }, + { + "type": "Bare", + "value": "minustenth", + "range": [ + 95, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Float", + "value": "-1E-1", + "number": -0.1, + "range": [ + 108, + 113 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 18 + } + } } ], "comments": [], "range": [ 0, - 95 + 114 ], "loc": { "start": { @@ -938,7 +1067,7 @@ "column": 0 }, "end": { - "line": 8, + "line": 9, "column": 0 } } diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-exponent-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/exponent-value.json similarity index 70% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-exponent-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/exponent-value.json index 8fe6cb5..20200e4 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-exponent-value.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/exponent-value.json @@ -5,5 +5,6 @@ "pos": 300, "zero": 3, "pointlower": 310, - "pointupper": 310 + "pointupper": 310, + "minustenth": -0.1 } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/float-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/float-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/float-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/float-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/inf-and-nan-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/inf-and-nan-output.json new file mode 100644 index 0000000..e8beb8c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/inf-and-nan-output.json @@ -0,0 +1,853 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nan", + "range": [ + 135, + 138 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + } + ], + "range": [ + 135, + 138 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "nan", + "range": [ + 141, + 144 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 135, + 144 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nan_neg", + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + ], + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "-nan", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 145, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nan_plus", + "range": [ + 160, + 168 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "range": [ + 160, + 168 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "+nan", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "range": [ + 160, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "infinity", + "range": [ + 176, + 184 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "range": [ + 176, + 184 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# Infinity #", + "number": "inf", + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "range": [ + 176, + 190 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "infinity_neg", + "range": [ + 191, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 191, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# -Infinity #", + "number": "-inf", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 191, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "infinity_plus", + "range": [ + 211, + 224 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "range": [ + 211, + 224 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# Infinity #", + "number": "+inf", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "range": [ + 211, + 231 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "range": [ + 135, + 231 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "nan", + "range": [ + 135, + 138 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "nan", + "number": "# NaN #", + "range": [ + 141, + 144 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "nan_neg", + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Float", + "value": "-nan", + "number": "# NaN #", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "nan_plus", + "range": [ + 160, + 168 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 169, + 170 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Float", + "value": "+nan", + "number": "# NaN #", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "infinity", + "range": [ + 176, + 184 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Float", + "value": "inf", + "number": "# Infinity #", + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "infinity_neg", + "range": [ + 191, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "Float", + "value": "-inf", + "number": "# -Infinity #", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "infinity_plus", + "range": [ + 211, + 224 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Float", + "value": "+inf", + "number": "# Infinity #", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " We don't encode +nan and -nan back with the signs; many languages don't", + "range": [ + 0, + 73 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 73 + } + } + }, + { + "type": "Block", + "value": " support a sign on NaN (it doesn't really make much sense).", + "range": [ + 74, + 134 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 60 + } + } + } + ], + "range": [ + 0, + 232 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/inf-and-nan-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/inf-and-nan-value.json new file mode 100644 index 0000000..8ce76f0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/inf-and-nan-value.json @@ -0,0 +1,8 @@ +{ + "nan": "# NaN #", + "nan_neg": "# NaN #", + "nan_plus": "# NaN #", + "infinity": "# Infinity #", + "infinity_neg": "# -Infinity #", + "infinity_plus": "# Infinity #" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-float-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/long-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-float-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/long-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-float-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/long-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-float-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/long-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-underscore-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/underscore-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-underscore-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/underscore-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-underscore-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/underscore-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float-underscore-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/underscore-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/zero-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/zero-output.json new file mode 100644 index 0000000..42b6dd4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/zero-output.json @@ -0,0 +1,945 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "zero", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "0.0", + "range": [ + 7, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "range": [ + 0, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "signed-pos", + "range": [ + 11, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "range": [ + 11, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "+0.0", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 11, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "signed-neg", + "range": [ + 29, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "range": [ + 29, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "-0.0", + "range": [ + 42, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 29, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "exponent", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "0e0", + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "exponent-two-0", + "range": [ + 62, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 14 + } + } + } + ], + "range": [ + 62, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "0e00", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 62, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "exponent-signed-pos", + "range": [ + 84, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 84, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "+0e0", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 84, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "exponent-signed-neg", + "range": [ + 111, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 111, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 0, + "number": "-0e0", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 111, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 0, + 137 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "zero", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "0.0", + "number": 0, + "range": [ + 7, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "signed-pos", + "range": [ + 11, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Float", + "value": "+0.0", + "number": 0, + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "signed-neg", + "range": [ + 29, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Float", + "value": "-0.0", + "number": 0, + "range": [ + 42, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "exponent", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Float", + "value": "0e0", + "number": 0, + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "exponent-two-0", + "range": [ + 62, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Float", + "value": "0e00", + "number": 0, + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "exponent-signed-pos", + "range": [ + 84, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Float", + "value": "+0e0", + "number": 0, + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Bare", + "value": "exponent-signed-neg", + "range": [ + 111, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "Float", + "value": "-0e0", + "number": 0, + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "comments": [], + "range": [ + 0, + 138 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/zero-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/zero-value.json new file mode 100644 index 0000000..d594203 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/float/zero-value.json @@ -0,0 +1,9 @@ +{ + "zero": 0, + "signed-pos": 0, + "signed-neg": 0, + "exponent": 0, + "exponent-two-0": 0, + "exponent-signed-pos": 0, + "exponent-signed-neg": 0 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/array-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-array-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/array-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-array-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/array-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-array-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/array-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/bool-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/bool-output.json new file mode 100644 index 0000000..c849ce9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/bool-output.json @@ -0,0 +1,461 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + } + ], + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 9, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "range": [ + 5, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": false, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + "range": [ + 15, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 24 + } + } + } + ], + "range": [ + 4, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + } + } + ], + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "a", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 9, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Boolean", + "value": "false", + "boolean": false, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + } + } + ], + "comments": [], + "range": [ + 0, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/bool-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/bool-value.json new file mode 100644 index 0000000..9f78f98 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/bool-value.json @@ -0,0 +1,6 @@ +{ + "a": { + "a": true, + "b": false + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/empty-output.json new file mode 100644 index 0000000..f7662ba --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/empty-output.json @@ -0,0 +1,1931 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "empty1", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 9, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "range": [ + 0, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "empty2", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "range": [ + 12, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "empty_in_array", + "range": [ + 25, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "range": [ + 25, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "not_empty", + "range": [ + 46, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + ], + "range": [ + 46, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 46, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + ], + "range": [ + 44, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 63, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 42, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + "range": [ + 25, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "empty_in_array2", + "range": [ + 68, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "range": [ + 68, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 87, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "not_empty", + "range": [ + 91, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 91, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "range": [ + 91, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "range": [ + 90, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "range": [ + 86, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "range": [ + 68, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "many_empty", + "range": [ + 105, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + ], + "range": [ + 105, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 119, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 122, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + ], + "range": [ + 118, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "range": [ + 105, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nested_empty", + "range": [ + 129, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + ], + "range": [ + 129, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "empty", + "style": "basic", + "multiline": false, + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + ], + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 153, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 145, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 144, + 156 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "range": [ + 129, + 156 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "with_cmt", + "range": [ + 157, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + ], + "range": [ + 157, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 167, + 181 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 157, + 181 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + ], + "range": [ + 0, + 181 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "empty1", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "empty2", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "empty_in_array", + "range": [ + 25, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "not_empty", + "range": [ + 46, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + { + "type": "Bare", + "value": "empty_in_array2", + "range": [ + 68, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "not_empty", + "range": [ + 91, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + { + "type": "Bare", + "value": "many_empty", + "range": [ + 105, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "nested_empty", + "range": [ + 129, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"empty\"", + "string": "empty", + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "with_cmt", + "range": [ + 157, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": "nothing here", + "range": [ + 181, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 0, + 195 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/empty-value.json new file mode 100644 index 0000000..4002905 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/empty-value.json @@ -0,0 +1,25 @@ +{ + "empty1": {}, + "empty2": {}, + "empty_in_array": [ + { + "not_empty": 1 + }, + {} + ], + "empty_in_array2": [ + {}, + { + "not_empty": 1 + } + ], + "many_empty": [ + {}, + {}, + {} + ], + "nested_empty": { + "empty": {} + }, + "with_cmt": {} +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/right-curly-brace-after-boolean-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/end-in-bool-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/right-curly-brace-after-boolean-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/end-in-bool-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/right-curly-brace-after-boolean-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/end-in-bool-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/right-curly-brace-after-boolean-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/end-in-bool-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/inline-table-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/inline-table-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/inline-table-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/inline-table-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/key-dotted-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/key-dotted-output.json new file mode 100644 index 0000000..e0b0d9a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/key-dotted-output.json @@ -0,0 +1,5702 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "inline", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 42, + "number": "42", + "range": [ + 16, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "range": [ + 10, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + } + } + ], + "range": [ + 9, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "range": [ + 0, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "many", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "dots", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "TOMLBare", + "name": "here", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 36, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 40, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 44, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + ], + "range": [ + 21, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "range": [ + 51, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + "range": [ + 51, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 43 + }, + "end": { + "line": 3, + "column": 44 + } + } + }, + { + "type": "TOMLBare", + "name": "d", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 45 + }, + "end": { + "line": 3, + "column": 46 + } + } + } + ], + "range": [ + 62, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 46 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 50 + } + } + } + ], + "range": [ + 50, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + "range": [ + 21, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "range": [ + 82, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 17 + } + } + } + ], + "range": [ + 78, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 74, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + ], + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "b", + "style": "basic", + "multiline": false, + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 104, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "range": [ + 100, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 96, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "c", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + } + ], + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + ], + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "range": [ + 130, + 145 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "range": [ + 126, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "range": [ + 122, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "a", + "style": "literal", + "multiline": false, + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "b", + "style": "basic", + "multiline": false, + "range": [ + 168, + 171 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 21 + } + } + } + ], + "range": [ + 158, + 171 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "range": [ + 158, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 27 + } + } + } + ], + "range": [ + 154, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + "range": [ + 150, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "e", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + } + ], + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + } + ], + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 191, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 10 + } + } + } + ], + "range": [ + 186, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "range": [ + 182, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl", + "range": [ + 196, + 199 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "range": [ + 196, + 199 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "resolvedKey": [ + "tbl" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 203, + 204 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + } + ], + "range": [ + 201, + 206 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "TOMLBare", + "name": "e", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + ], + "range": [ + 210, + 213 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "range": [ + 210, + 215 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 14 + } + } + } + ], + "range": [ + 209, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "range": [ + 201, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 15 + } + } + } + ], + "range": [ + 195, + 216 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl", + "range": [ + 219, + 222 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "x", + "range": [ + 223, + 224 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 6 + } + } + } + ], + "range": [ + 219, + 224 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 6 + } + } + }, + "resolvedKey": [ + "tbl", + "x" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + } + ], + "range": [ + 226, + 231 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 235, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "TOMLBare", + "name": "e", + "range": [ + 237, + 238 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + ], + "range": [ + 235, + 238 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "range": [ + 235, + 240 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + ], + "range": [ + 234, + 241 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "range": [ + 226, + 241 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 15 + } + } + } + ], + "range": [ + 218, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + } + ], + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + "resolvedKey": [ + "arr", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "t", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + } + ], + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 256, + 257 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 8 + } + } + } + ], + "range": [ + 256, + 259 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 10 + } + } + } + ], + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "range": [ + 251, + 262 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "T", + "range": [ + 263, + 264 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 1 + } + } + } + ], + "range": [ + 263, + 264 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 268, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "range": [ + 268, + 273 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "range": [ + 267, + 274 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "range": [ + 263, + 274 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 11 + } + } + } + ], + "range": [ + 243, + 274 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 5 + } + } + } + ], + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 5 + } + } + }, + "resolvedKey": [ + "arr", + 1 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "t", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + } + ], + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 22, + "column": 7 + }, + "end": { + "line": 22, + "column": 8 + } + } + } + ], + "range": [ + 289, + 292 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 22, + "column": 10 + } + } + }, + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 10 + } + } + } + ], + "range": [ + 288, + 295 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "range": [ + 284, + 295 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "T", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + } + ], + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 303, + 304 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + ], + "range": [ + 301, + 304 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 305, + 306 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 10 + } + } + }, + "range": [ + 301, + 306 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 10 + } + } + } + ], + "range": [ + 300, + 307 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "range": [ + 296, + 307 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 11 + } + } + } + ], + "range": [ + 276, + 307 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 11 + } + } + } + ], + "range": [ + 0, + 307 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 23, + "column": 11 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "inline", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "42", + "number": 42, + "range": [ + 16, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "many", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "dots", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "here", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 36, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 40, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 44, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 42 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 43 + }, + "end": { + "line": 3, + "column": 44 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 44 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 45 + }, + "end": { + "line": 3, + "column": 46 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 48 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 50 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"a\"", + "string": "a", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"b\"", + "string": "b", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 148, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "LiteralString", + "value": "'a'", + "string": "a", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "BasicString", + "value": "\"b\"", + "string": "b", + "range": [ + 168, + 171 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": "Bare", + "value": "e", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 191, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 192, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "tbl", + "range": [ + 196, + 199 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 203, + 204 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 211, + 212 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "e", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "tbl", + "range": [ + 219, + 222 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 222, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 223, + 224 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 224, + 225 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 227, + 228 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 235, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "e", + "range": [ + 237, + 238 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 238, + 239 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 243, + 244 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 248, + 249 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "t", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 256, + 257 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 261, + 262 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "T", + "range": [ + 263, + 264 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 273, + 274 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 277, + 278 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 21, + "column": 5 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 282, + 283 + ], + "loc": { + "start": { + "line": 21, + "column": 6 + }, + "end": { + "line": 21, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "t", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 286, + 287 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 288, + 289 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 290, + 291 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 22, + "column": 7 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 292, + 293 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 22, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "T", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 298, + 299 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 302, + 303 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 303, + 304 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 305, + 306 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 306, + 307 + ], + "loc": { + "start": { + "line": 23, + "column": 10 + }, + "end": { + "line": 23, + "column": 11 + } + } + } + ], + "comments": [], + "range": [ + 0, + 308 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/key-dotted-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/key-dotted-value.json new file mode 100644 index 0000000..0b80c5b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/key-dotted-value.json @@ -0,0 +1,98 @@ +{ + "inline": { + "a": { + "b": 42 + } + }, + "many": { + "dots": { + "here": { + "dot": { + "dot": { + "dot": { + "a": { + "b": { + "c": 1, + "d": 2 + } + } + } + } + } + } + } + }, + "a": { + "a": { + "b": 1 + } + }, + "b": { + "a": { + "b": 1 + } + }, + "c": { + "a": { + "b": 1 + } + }, + "d": { + "a": { + "b": 1 + } + }, + "e": { + "a": { + "b": 1 + } + }, + "tbl": { + "a": { + "b": { + "c": { + "d": { + "e": 1 + } + } + } + }, + "x": { + "a": { + "b": { + "c": { + "d": { + "e": 1 + } + } + } + } + } + }, + "arr": [ + { + "t": { + "a": { + "b": 1 + } + }, + "T": { + "a": { + "b": 1 + } + } + }, + { + "t": { + "a": { + "b": 2 + } + }, + "T": { + "a": { + "b": 2 + } + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/multiline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/multiline-output.json new file mode 100644 index 0000000..58e74b2 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/multiline-output.json @@ -0,0 +1,759 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl_multiline", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "range": [ + 18, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + ], + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "multiline\n", + "style": "basic", + "multiline": true, + "range": [ + 29, + 46 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "range": [ + 25, + 46 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "c", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "and yet\nanother line", + "style": "basic", + "multiline": true, + "range": [ + 52, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "range": [ + 48, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 80, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "range": [ + 16, + 87 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 0, + 87 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "range": [ + 0, + 87 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "tbl_multiline", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nmultiline\n\"\"\"", + "string": "multiline\n", + "range": [ + 29, + 46 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"and yet\nanother line\"\"\"", + "string": "and yet\nanother line", + "range": [ + 52, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "comments": [], + "range": [ + 0, + 88 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/multiline-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/multiline-value.json new file mode 100644 index 0000000..505854f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/multiline-value.json @@ -0,0 +1,8 @@ +{ + "tbl_multiline": { + "a": 1, + "b": "multiline\n", + "c": "and yet\nanother line", + "d": 4 + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/nest-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/nest-output.json new file mode 100644 index 0000000..5e6e409 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/nest-output.json @@ -0,0 +1,2959 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl_tbl_empty", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl_0", + "range": [ + 18, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "range": [ + 18, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 26, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "range": [ + 18, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 28 + } + } + } + ], + "range": [ + 16, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "range": [ + 0, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl_tbl_val", + "range": [ + 31, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 31, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl_1", + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 59, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 59, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 35 + } + } + } + ], + "range": [ + 57, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 49, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 37 + } + } + } + ], + "range": [ + 47, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 31, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl_arr_tbl", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ], + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr_tbl", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 39 + } + } + } + ], + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 41 + } + } + } + ], + "range": [ + 99, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 89, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + ], + "range": [ + 87, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 71, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr_tbl_tbl", + "range": [ + 117, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 117, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl", + "range": [ + 137, + 140 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "range": [ + 137, + 140 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 145, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 145, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "range": [ + 143, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 137, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + ], + "range": [ + 135, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 158 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "range": [ + 117, + 158 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr_arr_tbl_empty", + "range": [ + 254, + 271 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 17 + } + } + } + ], + "range": [ + 254, + 271 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [], + "range": [ + 278, + 280 + ], + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 26 + } + } + } + ], + "range": [ + 276, + 282 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 28 + } + } + } + ], + "range": [ + 274, + 284 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + "range": [ + 254, + 284 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr_arr_tbl_val", + "range": [ + 285, + 300 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + ], + "range": [ + 285, + 300 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 309, + 312 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 27 + } + } + } + ], + "range": [ + 309, + 312 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 31 + } + } + }, + "range": [ + 309, + 316 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 31 + } + } + } + ], + "range": [ + 307, + 318 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 33 + } + } + } + ], + "range": [ + 305, + 320 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 35 + } + } + } + ], + "range": [ + 303, + 322 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 37 + } + } + }, + "range": [ + 285, + 322 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 37 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr_arr_tbls", + "range": [ + 323, + 335 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + ], + "range": [ + 323, + 335 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 345, + 348 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 25 + } + } + } + ], + "range": [ + 345, + 348 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 351, + 352 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 29 + } + } + } + ], + "range": [ + 343, + 354 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "two", + "range": [ + 358, + 361 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "range": [ + 358, + 361 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 364, + 365 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 42 + } + } + }, + "range": [ + 358, + 365 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 42 + } + } + } + ], + "range": [ + 356, + 367 + ], + "loc": { + "start": { + "line": 10, + "column": 33 + }, + "end": { + "line": 10, + "column": 44 + } + } + } + ], + "range": [ + 341, + 369 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 46 + } + } + } + ], + "range": [ + 339, + 371 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 48 + } + } + }, + "range": [ + 323, + 371 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "range": [ + 0, + 371 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "tbl_tbl_empty", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "tbl_0", + "range": [ + 18, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "tbl_tbl_val", + "range": [ + 31, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "tbl_1", + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 59, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 36 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + { + "type": "Bare", + "value": "tbl_arr_tbl", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "arr_tbl", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 42 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 44 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + { + "type": "Bare", + "value": "arr_tbl_tbl", + "range": [ + 117, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "tbl", + "range": [ + 137, + 140 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 145, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 157, + 158 + ], + "loc": { + "start": { + "line": 4, + "column": 40 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + { + "type": "Bare", + "value": "arr_arr_tbl_empty", + "range": [ + 254, + 271 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 278, + 279 + ], + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 279, + 280 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 283, + 284 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "arr_arr_tbl_val", + "range": [ + 285, + 300 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 303, + 304 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 305, + 306 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 307, + 308 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 309, + 312 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 313, + 314 + ], + "loc": { + "start": { + "line": 9, + "column": 28 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 317, + 318 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 321, + 322 + ], + "loc": { + "start": { + "line": 9, + "column": 36 + }, + "end": { + "line": 9, + "column": 37 + } + } + }, + { + "type": "Bare", + "value": "arr_arr_tbls", + "range": [ + 323, + 335 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 337, + 338 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 339, + 340 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 341, + 342 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 343, + 344 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 345, + 348 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 349, + 350 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 351, + 352 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 353, + 354 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 354, + 355 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 356, + 357 + ], + "loc": { + "start": { + "line": 10, + "column": 33 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + { + "type": "Bare", + "value": "two", + "range": [ + 358, + 361 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 10, + "column": 39 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 364, + 365 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 44 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 368, + 369 + ], + "loc": { + "start": { + "line": 10, + "column": 45 + }, + "end": { + "line": 10, + "column": 46 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 10, + "column": 47 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Array-of-array-of-table is interesting because it can only", + "range": [ + 160, + 220 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 60 + } + } + }, + { + "type": "Block", + "value": " be represented in inline form.", + "range": [ + 221, + 253 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "range": [ + 0, + 372 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/nest-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/nest-value.json new file mode 100644 index 0000000..f783675 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/nest-value.json @@ -0,0 +1,46 @@ +{ + "tbl_tbl_empty": { + "tbl_0": {} + }, + "tbl_tbl_val": { + "tbl_1": { + "one": 1 + } + }, + "tbl_arr_tbl": { + "arr_tbl": [ + { + "one": 1 + } + ] + }, + "arr_tbl_tbl": [ + { + "tbl": { + "one": 1 + } + } + ], + "arr_arr_tbl_empty": [ + [ + {} + ] + ], + "arr_arr_tbl_val": [ + [ + { + "one": 1 + } + ] + ], + "arr_arr_tbls": [ + [ + { + "one": 1 + }, + { + "two": 2 + } + ] + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/newline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/newline-output.json new file mode 100644 index 0000000..5f4c0bd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/newline-output.json @@ -0,0 +1 @@ +"No newlines are allowed between the curly braces unless they are valid within a value@line:4,column:1" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/spaces-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/spaces-output.json new file mode 100644 index 0000000..b1585a3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/spaces-output.json @@ -0,0 +1,1711 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "clap-1", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "version", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "4", + "style": "basic", + "multiline": false, + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 63, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "features", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "derive", + "style": "basic", + "multiline": false, + "range": [ + 92, + 100 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "cargo", + "style": "basic", + "multiline": false, + "range": [ + 102, + 109 + ], + "loc": { + "start": { + "line": 2, + "column": 50 + }, + "end": { + "line": 2, + "column": 57 + } + } + } + ], + "range": [ + 91, + 110 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 58 + } + } + }, + "range": [ + 80, + 110 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 58 + } + } + } + ], + "range": [ + 61, + 112 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 60 + } + } + }, + "range": [ + 52, + 112 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 60 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "clap-2", + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + ], + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "version", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "4", + "style": "basic", + "multiline": false, + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "range": [ + 155, + 168 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "features", + "range": [ + 178, + 186 + ], + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 5, + "column": 42 + } + } + } + ], + "range": [ + 178, + 186 + ], + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 5, + "column": 42 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "derive", + "style": "basic", + "multiline": false, + "range": [ + 193, + 201 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 57 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "cargo", + "style": "basic", + "multiline": false, + "range": [ + 211, + 218 + ], + "loc": { + "start": { + "line": 5, + "column": 67 + }, + "end": { + "line": 5, + "column": 74 + } + } + } + ], + "range": [ + 189, + 222 + ], + "loc": { + "start": { + "line": 5, + "column": 45 + }, + "end": { + "line": 5, + "column": 78 + } + } + }, + "range": [ + 178, + 222 + ], + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 5, + "column": 78 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nest", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 5, + "column": 83 + }, + "end": { + "line": 5, + "column": 87 + } + } + } + ], + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 5, + "column": 83 + }, + "end": { + "line": 5, + "column": 87 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 244, + 247 + ], + "loc": { + "start": { + "line": 5, + "column": 100 + }, + "end": { + "line": 5, + "column": 103 + } + } + } + ], + "range": [ + 244, + 247 + ], + "loc": { + "start": { + "line": 5, + "column": 100 + }, + "end": { + "line": 5, + "column": 103 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "x", + "style": "literal", + "multiline": false, + "range": [ + 254, + 257 + ], + "loc": { + "start": { + "line": 5, + "column": 110 + }, + "end": { + "line": 5, + "column": 113 + } + } + }, + "range": [ + 244, + 257 + ], + "loc": { + "start": { + "line": 5, + "column": 100 + }, + "end": { + "line": 5, + "column": 113 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "b", + "style": "literal", + "multiline": false, + "range": [ + 264, + 267 + ], + "loc": { + "start": { + "line": 5, + "column": 120 + }, + "end": { + "line": 5, + "column": 123 + } + } + } + ], + "range": [ + 264, + 267 + ], + "loc": { + "start": { + "line": 5, + "column": 120 + }, + "end": { + "line": 5, + "column": 123 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "float", + "value": 1.5, + "number": "1.5", + "range": [ + 274, + 277 + ], + "loc": { + "start": { + "line": 5, + "column": 130 + }, + "end": { + "line": 5, + "column": 133 + } + } + }, + { + "type": "TOMLValue", + "kind": "float", + "value": 9, + "number": "9.0", + "range": [ + 285, + 288 + ], + "loc": { + "start": { + "line": 5, + "column": 141 + }, + "end": { + "line": 5, + "column": 144 + } + } + } + ], + "range": [ + 272, + 291 + ], + "loc": { + "start": { + "line": 5, + "column": 128 + }, + "end": { + "line": 5, + "column": 147 + } + } + }, + "range": [ + 264, + 291 + ], + "loc": { + "start": { + "line": 5, + "column": 120 + }, + "end": { + "line": 5, + "column": 147 + } + } + } + ], + "range": [ + 238, + 294 + ], + "loc": { + "start": { + "line": 5, + "column": 94 + }, + "end": { + "line": 5, + "column": 150 + } + } + }, + "range": [ + 227, + 294 + ], + "loc": { + "start": { + "line": 5, + "column": 83 + }, + "end": { + "line": 5, + "column": 150 + } + } + } + ], + "range": [ + 153, + 297 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 153 + } + } + }, + "range": [ + 144, + 297 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 153 + } + } + } + ], + "range": [ + 52, + 297 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 153 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "clap-1", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "version", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "BasicString", + "value": "\"4\"", + "string": "4", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "features", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + { + "type": "BasicString", + "value": "\"derive\"", + "string": "derive", + "range": [ + 92, + 100 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + { + "type": "BasicString", + "value": "\"cargo\"", + "string": "cargo", + "range": [ + 102, + 109 + ], + "loc": { + "start": { + "line": 2, + "column": 50 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 2, + "column": 57 + }, + "end": { + "line": 2, + "column": 58 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 2, + "column": 59 + }, + "end": { + "line": 2, + "column": 60 + } + } + }, + { + "type": "Bare", + "value": "clap-2", + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "version", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + { + "type": "BasicString", + "value": "\"4\"", + "string": "4", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "features", + "range": [ + 178, + 186 + ], + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 5, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 43 + }, + "end": { + "line": 5, + "column": 44 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 5, + "column": 45 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "BasicString", + "value": "\"derive\"", + "string": "derive", + "range": [ + 193, + 201 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 57 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 5, + "column": 61 + }, + "end": { + "line": 5, + "column": 62 + } + } + }, + { + "type": "BasicString", + "value": "\"cargo\"", + "string": "cargo", + "range": [ + 211, + 218 + ], + "loc": { + "start": { + "line": 5, + "column": 67 + }, + "end": { + "line": 5, + "column": 74 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 5, + "column": 77 + }, + "end": { + "line": 5, + "column": 78 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 81 + }, + "end": { + "line": 5, + "column": 82 + } + } + }, + { + "type": "Bare", + "value": "nest", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 5, + "column": 83 + }, + "end": { + "line": 5, + "column": 87 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 5, + "column": 90 + }, + "end": { + "line": 5, + "column": 91 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 238, + 239 + ], + "loc": { + "start": { + "line": 5, + "column": 94 + }, + "end": { + "line": 5, + "column": 95 + } + } + }, + { + "type": "BasicString", + "value": "\"a\"", + "string": "a", + "range": [ + 244, + 247 + ], + "loc": { + "start": { + "line": 5, + "column": 100 + }, + "end": { + "line": 5, + "column": 103 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 5, + "column": 106 + }, + "end": { + "line": 5, + "column": 107 + } + } + }, + { + "type": "LiteralString", + "value": "'x'", + "string": "x", + "range": [ + 254, + 257 + ], + "loc": { + "start": { + "line": 5, + "column": 110 + }, + "end": { + "line": 5, + "column": 113 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 5, + "column": 115 + }, + "end": { + "line": 5, + "column": 116 + } + } + }, + { + "type": "LiteralString", + "value": "'b'", + "string": "b", + "range": [ + 264, + 267 + ], + "loc": { + "start": { + "line": 5, + "column": 120 + }, + "end": { + "line": 5, + "column": 123 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 5, + "column": 126 + }, + "end": { + "line": 5, + "column": 127 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 5, + "column": 128 + }, + "end": { + "line": 5, + "column": 129 + } + } + }, + { + "type": "Float", + "value": "1.5", + "number": 1.5, + "range": [ + 274, + 277 + ], + "loc": { + "start": { + "line": 5, + "column": 130 + }, + "end": { + "line": 5, + "column": 133 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 5, + "column": 137 + }, + "end": { + "line": 5, + "column": 138 + } + } + }, + { + "type": "Float", + "value": "9.0", + "number": 9, + "range": [ + 285, + 288 + ], + "loc": { + "start": { + "line": 5, + "column": 141 + }, + "end": { + "line": 5, + "column": 144 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 290, + 291 + ], + "loc": { + "start": { + "line": 5, + "column": 146 + }, + "end": { + "line": 5, + "column": 147 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 5, + "column": 149 + }, + "end": { + "line": 5, + "column": 150 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 5, + "column": 152 + }, + "end": { + "line": 5, + "column": 153 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " https://github.com/toml-lang/toml-test/issues/146", + "range": [ + 0, + 51 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 51 + } + } + }, + { + "type": "Block", + "value": " Contains some literal tabs!", + "range": [ + 114, + 143 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "range": [ + 0, + 298 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/spaces-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/spaces-value.json new file mode 100644 index 0000000..24aede8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/inline-table/spaces-value.json @@ -0,0 +1,23 @@ +{ + "clap-1": { + "version": "4", + "features": [ + "derive", + "cargo" + ] + }, + "clap-2": { + "version": "4", + "features": [ + "derive", + "cargo" + ], + "nest": { + "a": "x", + "b": [ + 1.5, + 9 + ] + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-underscore-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-underscore-value.json deleted file mode 100644 index 622ec54..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-underscore-value.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "kilo": 1000 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/integer-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/integer-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/integer-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/integer-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/literals-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/literals-output.json new file mode 100644 index 0000000..64efa26 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/literals-output.json @@ -0,0 +1,1203 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bin1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 214, + "number": "0b11010110", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "range": [ + 0, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bin2", + "range": [ + 18, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 18, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 5, + "number": "0b101", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 18, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "oct1", + "range": [ + 34, + 38 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 34, + 38 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 342391, + "number": "0o01234567", + "range": [ + 41, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "range": [ + 34, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "oct2", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + } + ], + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 493, + "number": "0o755", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 52, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "oct3", + "range": [ + 65, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + } + ], + "range": [ + 65, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 501, + "number": "0o765", + "range": [ + 72, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "range": [ + 65, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex1", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3735928559, + "number": "0xDEADBEEF", + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "range": [ + 81, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex2", + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3735928559, + "number": "0xdeadbeef", + "range": [ + 106, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "range": [ + 99, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex3", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 4 + } + } + } + ], + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3735928559, + "number": "0xdeadbeef", + "range": [ + 124, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "range": [ + 117, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex4", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2439, + "number": "0x00987", + "range": [ + 143, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + "range": [ + 136, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "range": [ + 0, + 150 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "bin1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0b11010110", + "number": 214, + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "bin2", + "range": [ + 18, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0b1_0_1", + "number": 5, + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "oct1", + "range": [ + 34, + 38 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0o01234567", + "number": 342391, + "range": [ + 41, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "oct2", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0o755", + "number": 493, + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "oct3", + "range": [ + 65, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0o7_6_5", + "number": 501, + "range": [ + 72, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "hex1", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0xDEADBEEF", + "number": 3735928559, + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "hex2", + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0xdeadbeef", + "number": 3735928559, + "range": [ + 106, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "hex3", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0xdead_beef", + "number": 3735928559, + "range": [ + 124, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "hex4", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0x00987", + "number": 2439, + "range": [ + 143, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "comments": [], + "range": [ + 0, + 151 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/literals-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/literals-value.json new file mode 100644 index 0000000..b3fcfd0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/literals-value.json @@ -0,0 +1,11 @@ +{ + "bin1": 214, + "bin2": 5, + "oct1": 342391, + "oct2": 493, + "oct3": 501, + "hex1": 3735928559, + "hex2": 3735928559, + "hex3": 3735928559, + "hex4": 2439 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-integer-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/long-output.json similarity index 84% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-integer-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/long-output.json index 4027bcb..4533d30 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-integer-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/long-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "answer", + "name": "int64-max", "range": [ 0, - 6 + 9 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 6 + "column": 9 } } } ], "range": [ 0, - 6 + 9 ], "loc": { "start": { @@ -39,7 +39,7 @@ }, "end": { "line": 1, - "column": 6 + "column": 9 } } }, @@ -49,23 +49,23 @@ "value": 9223372036854776000, "number": "9223372036854775807", "range": [ - 9, - 28 + 12, + 31 ], "loc": { "start": { "line": 1, - "column": 9 + "column": 12 }, "end": { "line": 1, - "column": 28 + "column": 31 } } }, "range": [ 0, - 28 + 31 ], "loc": { "start": { @@ -74,7 +74,7 @@ }, "end": { "line": 1, - "column": 28 + "column": 31 } } }, @@ -85,10 +85,10 @@ "keys": [ { "type": "TOMLBare", - "name": "neganswer", + "name": "int64-max-neg", "range": [ - 29, - 38 + 32, + 45 ], "loc": { "start": { @@ -97,14 +97,14 @@ }, "end": { "line": 2, - "column": 9 + "column": 13 } } } ], "range": [ - 29, - 38 + 32, + 45 ], "loc": { "start": { @@ -113,7 +113,7 @@ }, "end": { "line": 2, - "column": 9 + "column": 13 } } }, @@ -123,23 +123,23 @@ "value": -9223372036854776000, "number": "-9223372036854775808", "range": [ - 41, - 61 + 48, + 68 ], "loc": { "start": { "line": 2, - "column": 12 + "column": 16 }, "end": { "line": 2, - "column": 32 + "column": 36 } } }, "range": [ - 29, - 61 + 32, + 68 ], "loc": { "start": { @@ -148,14 +148,14 @@ }, "end": { "line": 2, - "column": 32 + "column": 36 } } } ], "range": [ 0, - 61 + 68 ], "loc": { "start": { @@ -164,7 +164,7 @@ }, "end": { "line": 2, - "column": 32 + "column": 36 } } } @@ -173,10 +173,10 @@ "tokens": [ { "type": "Bare", - "value": "answer", + "value": "int64-max", "range": [ 0, - 6 + 9 ], "loc": { "start": { @@ -185,7 +185,7 @@ }, "end": { "line": 1, - "column": 6 + "column": 9 } } }, @@ -193,17 +193,17 @@ "type": "Punctuator", "value": "=", "range": [ - 7, - 8 + 10, + 11 ], "loc": { "start": { "line": 1, - "column": 7 + "column": 10 }, "end": { "line": 1, - "column": 8 + "column": 11 } } }, @@ -212,26 +212,26 @@ "value": "9223372036854775807", "number": 9223372036854776000, "range": [ - 9, - 28 + 12, + 31 ], "loc": { "start": { "line": 1, - "column": 9 + "column": 12 }, "end": { "line": 1, - "column": 28 + "column": 31 } } }, { "type": "Bare", - "value": "neganswer", + "value": "int64-max-neg", "range": [ - 29, - 38 + 32, + 45 ], "loc": { "start": { @@ -240,7 +240,7 @@ }, "end": { "line": 2, - "column": 9 + "column": 13 } } }, @@ -248,17 +248,17 @@ "type": "Punctuator", "value": "=", "range": [ - 39, - 40 + 46, + 47 ], "loc": { "start": { "line": 2, - "column": 10 + "column": 14 }, "end": { "line": 2, - "column": 11 + "column": 15 } } }, @@ -267,17 +267,17 @@ "value": "-9223372036854775808", "number": -9223372036854776000, "range": [ - 41, - 61 + 48, + 68 ], "loc": { "start": { "line": 2, - "column": 12 + "column": 16 }, "end": { "line": 2, - "column": 32 + "column": 36 } } } @@ -285,7 +285,7 @@ "comments": [], "range": [ 0, - 62 + 69 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/long-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/long-value.json new file mode 100644 index 0000000..3e4acde --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/long-value.json @@ -0,0 +1,4 @@ +{ + "int64-max": 9223372036854776000, + "int64-max-neg": -9223372036854776000 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/underscore-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/underscore-output.json new file mode 100644 index 0000000..0ee6d50 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/underscore-output.json @@ -0,0 +1,300 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "kilo", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1000, + "number": "1000", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + } + ], + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1111, + "number": "1111", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 13, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 0, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "kilo", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "1_000", + "number": 1000, + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "1_1_1_1", + "number": 1111, + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "comments": [], + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/underscore-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/underscore-value.json new file mode 100644 index 0000000..c2b6d40 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/underscore-value.json @@ -0,0 +1,4 @@ +{ + "kilo": 1000, + "x": 1111 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/zero-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/zero-output.json new file mode 100644 index 0000000..719f27e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/zero-output.json @@ -0,0 +1,1590 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d1", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + } + ], + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d2", + "range": [ + 7, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 2 + } + } + } + ], + "range": [ + 7, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "+0", + "range": [ + 12, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "range": [ + 7, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d3", + "range": [ + 15, + 17 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + } + } + ], + "range": [ + 15, + 17 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "-0", + "range": [ + 20, + 22 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "range": [ + 15, + 22 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "h1", + "range": [ + 24, + 26 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + ], + "range": [ + 24, + 26 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0x0", + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "range": [ + 24, + 32 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "h2", + "range": [ + 33, + 35 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + ], + "range": [ + 33, + 35 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0x00", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "h3", + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + ], + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0x00000", + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 43, + 55 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "o1", + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + ], + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0o0", + "range": [ + 62, + 65 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a2", + "range": [ + 66, + 68 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + ], + "range": [ + 66, + 68 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0o00", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a3", + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 2 + } + } + } + ], + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0o00000", + "range": [ + 81, + 88 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "range": [ + 76, + 88 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b1", + "range": [ + 90, + 92 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + ], + "range": [ + 90, + 92 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0b0", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "range": [ + 90, + 98 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b2", + "range": [ + 99, + 101 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + ], + "range": [ + 99, + 101 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0b00", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 99, + 108 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b3", + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + ], + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0b00000", + "range": [ + 114, + 121 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "range": [ + 109, + 121 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + ], + "range": [ + 0, + 121 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "d1", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0", + "number": 0, + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "d2", + "range": [ + 7, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "+0", + "number": 0, + "range": [ + 12, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "d3", + "range": [ + 15, + 17 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "-0", + "number": 0, + "range": [ + 20, + 22 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "h1", + "range": [ + 24, + 26 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0x0", + "number": 0, + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "h2", + "range": [ + 33, + 35 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0x00", + "number": 0, + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "h3", + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0x00000", + "number": 0, + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "o1", + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0o0", + "number": 0, + "range": [ + 62, + 65 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "a2", + "range": [ + 66, + 68 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0o00", + "number": 0, + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "a3", + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0o00000", + "number": 0, + "range": [ + 81, + 88 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "b1", + "range": [ + 90, + 92 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0b0", + "number": 0, + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "b2", + "range": [ + 99, + 101 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0b00", + "number": 0, + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "b3", + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "0b00000", + "number": 0, + "range": [ + 114, + 121 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + ], + "comments": [], + "range": [ + 0, + 122 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/zero-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/zero-value.json new file mode 100644 index 0000000..6caf7c8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer/zero-value.json @@ -0,0 +1,14 @@ +{ + "d1": 0, + "d2": 0, + "d3": 0, + "h1": 0, + "h2": 0, + "h3": 0, + "o1": 0, + "a2": 0, + "a3": 0, + "b1": 0, + "b2": 0, + "b3": 0 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-space-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-space-value.json deleted file mode 100644 index 4c4c7f2..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-space-value.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "a b": 1 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-special-chars-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-special-chars-value.json deleted file mode 100644 index f3bf212..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-special-chars-value.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "~!@$^&*()_+-`1234567890[]|/?><.,;:'": 1 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/alphanum-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/alphanum-output.json new file mode 100644 index 0000000..8517c75 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/alphanum-output.json @@ -0,0 +1,1566 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "alpha", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 8, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "range": [ + 0, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "123", + "range": [ + 12, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 12, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "num", + "style": "basic", + "multiline": false, + "range": [ + 18, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 12, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "000111", + "range": [ + 24, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "range": [ + 24, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "leading", + "style": "basic", + "multiline": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 24, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "10e3", + "range": [ + 43, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 43, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "false float", + "style": "basic", + "multiline": false, + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 43, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one1two2", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "mixed", + "style": "basic", + "multiline": false, + "range": [ + 75, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 64, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "with-dash", + "range": [ + 83, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "range": [ + 83, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "dashed", + "style": "basic", + "multiline": false, + "range": [ + 95, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "range": [ + 83, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "under_score", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "___", + "style": "basic", + "multiline": false, + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 104, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "34-11", + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 23, + "number": "23", + "range": [ + 132, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "range": [ + 124, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "2018_10", + "range": [ + 137, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + ], + "range": [ + 137, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "resolvedKey": [ + "2018_10" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "001", + "range": [ + 146, + 149 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + } + ], + "range": [ + 146, + 149 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "range": [ + 146, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 7 + } + } + } + ], + "range": [ + 136, + 153 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a-a-a", + "range": [ + 156, + 161 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 6 + } + } + } + ], + "range": [ + 156, + 161 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "resolvedKey": [ + "a-a-a" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "_", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + ], + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": false, + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 163, + 172 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "range": [ + 155, + 172 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "range": [ + 0, + 172 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "alpha", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"a\"", + "string": "a", + "range": [ + 8, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "123", + "range": [ + 12, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"num\"", + "string": "num", + "range": [ + 18, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "000111", + "range": [ + 24, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"leading\"", + "string": "leading", + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "10e3", + "range": [ + 43, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"false float\"", + "string": "false float", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "one1two2", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"mixed\"", + "string": "mixed", + "range": [ + 75, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "with-dash", + "range": [ + 83, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\"dashed\"", + "string": "dashed", + "range": [ + 95, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "under_score", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"___\"", + "string": "___", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "34-11", + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Integer", + "value": "23", + "number": 23, + "range": [ + 132, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "2018_10", + "range": [ + 137, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "001", + "range": [ + 146, + 149 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a-a-a", + "range": [ + 156, + 161 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "_", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "Boolean", + "value": "false", + "boolean": false, + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "comments": [], + "range": [ + 0, + 173 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/alphanum-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/alphanum-value.json new file mode 100644 index 0000000..2253b29 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/alphanum-value.json @@ -0,0 +1,16 @@ +{ + "123": "num", + "alpha": "a", + "000111": "leading", + "10e3": "false float", + "one1two2": "mixed", + "with-dash": "dashed", + "under_score": "___", + "34-11": 23, + "2018_10": { + "001": 1 + }, + "a-a-a": { + "_": false + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/case-sensitive-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/case-sensitive-output.json new file mode 100644 index 0000000..3937162 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/case-sensitive-output.json @@ -0,0 +1,1318 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sectioN", + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "NN", + "style": "basic", + "multiline": false, + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "range": [ + 0, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "section", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "resolvedKey": [ + "section" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "lower", + "style": "basic", + "multiline": false, + "range": [ + 33, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 26, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "NAME", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + } + ], + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "upper", + "style": "basic", + "multiline": false, + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 41, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "Name", + "range": [ + 56, + 60 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + } + ], + "range": [ + 56, + 60 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "capitalized", + "style": "basic", + "multiline": false, + "range": [ + 63, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "range": [ + 56, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + ], + "range": [ + 16, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "Section", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + ], + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "resolvedKey": [ + "Section" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 88, + 92 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "range": [ + 88, + 92 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "different section!!", + "style": "basic", + "multiline": false, + "range": [ + 95, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "μ", + "style": "basic", + "multiline": false, + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + } + ], + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "greek small letter mu", + "style": "basic", + "multiline": false, + "range": [ + 123, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "range": [ + 117, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "Μ", + "style": "basic", + "multiline": false, + "range": [ + 147, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + } + ], + "range": [ + 147, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "greek capital letter MU", + "style": "basic", + "multiline": false, + "range": [ + 153, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 147, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "M", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + } + ], + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "latin letter M", + "style": "basic", + "multiline": false, + "range": [ + 183, + 199 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + "range": [ + 179, + 199 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 20 + } + } + } + ], + "range": [ + 78, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 12, + "column": 20 + } + } + } + ], + "range": [ + 0, + 199 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 20 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "sectioN", + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"NN\"", + "string": "NN", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "section", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"lower\"", + "string": "lower", + "range": [ + 33, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "NAME", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"upper\"", + "string": "upper", + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "Name", + "range": [ + 56, + 60 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"capitalized\"", + "string": "capitalized", + "range": [ + 63, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "Section", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 88, + 92 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"different section!!\"", + "string": "different section!!", + "range": [ + 95, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + { + "type": "BasicString", + "value": "\"μ\"", + "string": "μ", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"greek small letter mu\"", + "string": "greek small letter mu", + "range": [ + 123, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "BasicString", + "value": "\"Μ\"", + "string": "Μ", + "range": [ + 147, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"greek capital letter MU\"", + "string": "greek capital letter MU", + "range": [ + 153, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "Bare", + "value": "M", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 181, + 182 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"latin letter M\"", + "string": "latin letter M", + "range": [ + 183, + 199 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 20 + } + } + } + ], + "comments": [], + "range": [ + 0, + 201 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/case-sensitive-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/case-sensitive-value.json new file mode 100644 index 0000000..ed57176 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/case-sensitive-value.json @@ -0,0 +1,14 @@ +{ + "sectioN": "NN", + "section": { + "name": "lower", + "NAME": "upper", + "Name": "capitalized" + }, + "Section": { + "name": "different section!!", + "μ": "greek small letter mu", + "Μ": "greek capital letter MU", + "M": "latin letter M" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-empty-output.json new file mode 100644 index 0000000..49d0ef9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-empty-output.json @@ -0,0 +1,724 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "literal", + "multiline": false, + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "x", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "empty.x", + "style": "basic", + "multiline": false, + "range": [ + 7, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "range": [ + 0, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "basic", + "multiline": false, + "range": [ + 19, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "x.empty", + "style": "basic", + "multiline": false, + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 17, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + } + ], + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + "resolvedKey": [ + "a" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "basic", + "multiline": false, + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "literal", + "multiline": false, + "range": [ + 41, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 5 + } + } + } + ], + "range": [ + 38, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "empty.empty", + "style": "basic", + "multiline": false, + "range": [ + 46, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "range": [ + 0, + 59 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "LiteralString", + "value": "''", + "string": "", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"empty.x\"", + "string": "empty.x", + "range": [ + 7, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "BasicString", + "value": "\"\"", + "string": "", + "range": [ + 19, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"x.empty\"", + "string": "x.empty", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"\"", + "string": "", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "LiteralString", + "value": "''", + "string": "", + "range": [ + 41, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"empty.empty\"", + "string": "empty.empty", + "range": [ + 46, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "comments": [], + "range": [ + 0, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-empty-value.json new file mode 100644 index 0000000..49ea0e8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-empty-value.json @@ -0,0 +1,13 @@ +{ + "": { + "x": "empty.x" + }, + "x": { + "": "x.empty" + }, + "a": { + "": { + "": "empty.empty" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-output.json new file mode 100644 index 0000000..ffd8db1 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-output.json @@ -0,0 +1,5307 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "first", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "range": [ + 52, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Arthur", + "style": "basic", + "multiline": false, + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 52, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "name", + "style": "basic", + "multiline": false, + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "last", + "style": "literal", + "multiline": false, + "range": [ + 81, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "range": [ + 74, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Dent", + "style": "basic", + "multiline": false, + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 74, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "many", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "dots", + "range": [ + 103, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "TOMLBare", + "name": "here", + "range": [ + 108, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 121, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 98, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 42, + "number": "42", + "range": [ + 127, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 98, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "count", + "range": [ + 181, + 186 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "a", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "range": [ + 181, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "range": [ + 181, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "count", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 199, + 208 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "range": [ + 199, + 216 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "basic", + "multiline": false, + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "c", + "style": "basic", + "multiline": false, + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + } + ], + "range": [ + 217, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 233, + 234 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "range": [ + 217, + 234 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "basic", + "multiline": false, + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "d", + "style": "basic", + "multiline": false, + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + ], + "range": [ + 235, + 248 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "range": [ + 235, + 252 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "literal", + "multiline": false, + "range": [ + 253, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "e", + "style": "literal", + "multiline": false, + "range": [ + 261, + 264 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + } + ], + "range": [ + 253, + 264 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 5, + "number": "5", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 253, + 270 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "literal", + "multiline": false, + "range": [ + 271, + 278 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "f", + "style": "literal", + "multiline": false, + "range": [ + 281, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 13 + } + } + } + ], + "range": [ + 271, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 6, + "number": "6", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + "range": [ + 271, + 288 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "basic", + "multiline": false, + "range": [ + 289, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "g", + "style": "literal", + "multiline": false, + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 11 + } + } + } + ], + "range": [ + 289, + 300 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 7, + "number": "7", + "range": [ + 305, + 306 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "range": [ + 289, + 306 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "basic", + "multiline": false, + "range": [ + 307, + 314 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "h", + "style": "literal", + "multiline": false, + "range": [ + 317, + 320 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 13 + } + } + } + ], + "range": [ + 307, + 320 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 8, + "number": "8", + "range": [ + 323, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "range": [ + 307, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "count", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "i", + "style": "literal", + "multiline": false, + "range": [ + 331, + 334 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 9 + } + } + } + ], + "range": [ + 325, + 334 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 9, + "number": "9", + "range": [ + 341, + 342 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "range": [ + 325, + 342 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "count", + "range": [ + 343, + 348 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "j", + "style": "literal", + "multiline": false, + "range": [ + 353, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + ], + "range": [ + 343, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 10, + "number": "10", + "range": [ + 362, + 364 + ], + "loc": { + "start": { + "line": 18, + "column": 19 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "range": [ + 343, + 364 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "basic", + "multiline": false, + "range": [ + 365, + 372 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + { + "type": "TOMLBare", + "name": "k", + "range": [ + 373, + 374 + ], + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + } + } + ], + "range": [ + 365, + 374 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 11, + "number": "11", + "range": [ + 381, + 383 + ], + "loc": { + "start": { + "line": 19, + "column": 16 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "range": [ + 365, + 383 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "count", + "style": "basic", + "multiline": false, + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + { + "type": "TOMLBare", + "name": "l", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + ], + "range": [ + 384, + 395 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 12, + "number": "12", + "range": [ + 400, + 402 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + "range": [ + 384, + 402 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "tbl", + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 4 + } + } + } + ], + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "resolvedKey": [ + "tbl" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 412, + 413 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 414, + 415 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + } + ], + "range": [ + 410, + 415 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 42.666, + "number": "42.666", + "range": [ + 418, + 424 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 14 + } + } + }, + "range": [ + 410, + 424 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 14 + } + } + } + ], + "range": [ + 404, + 424 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 23, + "column": 14 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 427, + 428 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "few", + "range": [ + 429, + 432 + ], + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "dots", + "range": [ + 433, + 437 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 25, + "column": 11 + } + } + } + ], + "range": [ + 427, + 437 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 11 + } + } + }, + "resolvedKey": [ + "a", + "few", + "dots" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "polka", + "range": [ + 439, + 444 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "dot", + "range": [ + 445, + 448 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 9 + } + } + } + ], + "range": [ + 439, + 448 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "again?", + "style": "basic", + "multiline": false, + "range": [ + 451, + 459 + ], + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + "range": [ + 439, + 459 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "polka", + "range": [ + 460, + 465 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "dance-with", + "range": [ + 466, + 476 + ], + "loc": { + "start": { + "line": 27, + "column": 6 + }, + "end": { + "line": 27, + "column": 16 + } + } + } + ], + "range": [ + 460, + 476 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 16 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Dot", + "style": "basic", + "multiline": false, + "range": [ + 479, + 484 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "range": [ + 460, + 484 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 24 + } + } + } + ], + "range": [ + 426, + 484 + ], + "loc": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 488, + 491 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 5 + } + } + } + ], + "range": [ + 488, + 491 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 5 + } + } + }, + "resolvedKey": [ + "arr", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 496, + 497 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 498, + 499 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 5 + } + } + } + ], + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 500, + 501 + ], + "loc": { + "start": { + "line": 30, + "column": 6 + }, + "end": { + "line": 30, + "column": 7 + } + } + }, + "range": [ + 494, + 501 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 502, + 503 + ], + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 504, + 505 + ], + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "d", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 5 + } + } + } + ], + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 508, + 509 + ], + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 7 + } + } + }, + "range": [ + 502, + 509 + ], + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 7 + } + } + } + ], + "range": [ + 486, + 509 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 31, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "arr", + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 33, + "column": 2 + }, + "end": { + "line": 33, + "column": 5 + } + } + } + ], + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 33, + "column": 2 + }, + "end": { + "line": 33, + "column": 5 + } + } + }, + "resolvedKey": [ + "arr", + 1 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 519, + 520 + ], + "loc": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 521, + 522 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 34, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 523, + 524 + ], + "loc": { + "start": { + "line": 34, + "column": 4 + }, + "end": { + "line": 34, + "column": 5 + } + } + } + ], + "range": [ + 519, + 524 + ], + "loc": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 525, + 526 + ], + "loc": { + "start": { + "line": 34, + "column": 6 + }, + "end": { + "line": 34, + "column": 7 + } + } + }, + "range": [ + 519, + 526 + ], + "loc": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 527, + 528 + ], + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 529, + 530 + ], + "loc": { + "start": { + "line": 35, + "column": 2 + }, + "end": { + "line": 35, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "d", + "range": [ + 531, + 532 + ], + "loc": { + "start": { + "line": 35, + "column": 4 + }, + "end": { + "line": 35, + "column": 5 + } + } + } + ], + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 533, + 534 + ], + "loc": { + "start": { + "line": 35, + "column": 6 + }, + "end": { + "line": 35, + "column": 7 + } + } + }, + "range": [ + 527, + 534 + ], + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 7 + } + } + } + ], + "range": [ + 511, + 534 + ], + "loc": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 35, + "column": 7 + } + } + } + ], + "range": [ + 52, + 534 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 35, + "column": 7 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "first", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"Arthur\"", + "string": "Arthur", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "BasicString", + "value": "\"name\"", + "string": "name", + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "LiteralString", + "value": "'last'", + "string": "last", + "range": [ + 81, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "BasicString", + "value": "\"Dent\"", + "string": "Dent", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "many", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "dots", + "range": [ + 103, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "here", + "range": [ + 108, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 121, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": "Integer", + "value": "42", + "number": 42, + "range": [ + 127, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": "Bare", + "value": "count", + "range": [ + 181, + 186 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "count", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + { + "type": "BasicString", + "value": "\"count\"", + "string": "count", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 224, + 225 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"c\"", + "string": "c", + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 233, + 234 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + { + "type": "BasicString", + "value": "\"count\"", + "string": "count", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 243, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"d\"", + "string": "d", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "LiteralString", + "value": "'count'", + "string": "count", + "range": [ + 253, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "LiteralString", + "value": "'e'", + "string": "e", + "range": [ + 261, + 264 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "5", + "number": 5, + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "LiteralString", + "value": "'count'", + "string": "count", + "range": [ + 271, + 278 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 279, + 280 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "LiteralString", + "value": "'f'", + "string": "f", + "range": [ + 281, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 285, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "6", + "number": 6, + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "BasicString", + "value": "\"count\"", + "string": "count", + "range": [ + 289, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "LiteralString", + "value": "'g'", + "string": "g", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 303, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "7", + "number": 7, + "range": [ + 305, + 306 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + { + "type": "BasicString", + "value": "\"count\"", + "string": "count", + "range": [ + 307, + 314 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + { + "type": "LiteralString", + "value": "'h'", + "string": "h", + "range": [ + 317, + 320 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 321, + 322 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "8", + "number": 8, + "range": [ + 323, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "count", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + { + "type": "LiteralString", + "value": "'i'", + "string": "i", + "range": [ + 331, + 334 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 339, + 340 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "9", + "number": 9, + "range": [ + 341, + 342 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "count", + "range": [ + 343, + 348 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 350, + 351 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "LiteralString", + "value": "'j'", + "string": "j", + "range": [ + 353, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 360, + 361 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 18 + } + } + }, + { + "type": "Integer", + "value": "10", + "number": 10, + "range": [ + 362, + 364 + ], + "loc": { + "start": { + "line": 18, + "column": 19 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + { + "type": "BasicString", + "value": "\"count\"", + "string": "count", + "range": [ + 365, + 372 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 372, + 373 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "k", + "range": [ + 373, + 374 + ], + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "11", + "number": 11, + "range": [ + 381, + 383 + ], + "loc": { + "start": { + "line": 19, + "column": 16 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + { + "type": "BasicString", + "value": "\"count\"", + "string": "count", + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 392, + 393 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "l", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 398, + 399 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "12", + "number": 12, + "range": [ + 400, + 402 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 404, + 405 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "tbl", + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 408, + 409 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 411, + 412 + ], + "loc": { + "start": { + "line": 23, + "column": 1 + }, + "end": { + "line": 23, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 412, + 413 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 413, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 414, + 415 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 416, + 417 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 7 + } + } + }, + { + "type": "Float", + "value": "42.666", + "number": 42.666, + "range": [ + 418, + 424 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 426, + 427 + ], + "loc": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 427, + 428 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 428, + 429 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "few", + "range": [ + 429, + 432 + ], + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 432, + 433 + ], + "loc": { + "start": { + "line": 25, + "column": 6 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "dots", + "range": [ + 433, + 437 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 25, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 437, + 438 + ], + "loc": { + "start": { + "line": 25, + "column": 11 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "polka", + "range": [ + 439, + 444 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "dot", + "range": [ + 445, + 448 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 449, + 450 + ], + "loc": { + "start": { + "line": 26, + "column": 10 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\"again?\"", + "string": "again?", + "range": [ + 451, + 459 + ], + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "polka", + "range": [ + 460, + 465 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 465, + 466 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "dance-with", + "range": [ + 466, + 476 + ], + "loc": { + "start": { + "line": 27, + "column": 6 + }, + "end": { + "line": 27, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 27, + "column": 17 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + { + "type": "BasicString", + "value": "\"Dot\"", + "string": "Dot", + "range": [ + 479, + 484 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 486, + 487 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 487, + 488 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 488, + 491 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 29, + "column": 5 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 492, + 493 + ], + "loc": { + "start": { + "line": 29, + "column": 6 + }, + "end": { + "line": 29, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 495, + 496 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 496, + 497 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 497, + 498 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 498, + 499 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 499, + 500 + ], + "loc": { + "start": { + "line": 30, + "column": 5 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 500, + 501 + ], + "loc": { + "start": { + "line": 30, + "column": 6 + }, + "end": { + "line": 30, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 502, + 503 + ], + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 503, + 504 + ], + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 31, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 504, + 505 + ], + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 505, + 506 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 507, + 508 + ], + "loc": { + "start": { + "line": 31, + "column": 5 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 508, + 509 + ], + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 512, + 513 + ], + "loc": { + "start": { + "line": 33, + "column": 1 + }, + "end": { + "line": 33, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "arr", + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 33, + "column": 2 + }, + "end": { + "line": 33, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 516, + 517 + ], + "loc": { + "start": { + "line": 33, + "column": 5 + }, + "end": { + "line": 33, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 517, + 518 + ], + "loc": { + "start": { + "line": 33, + "column": 6 + }, + "end": { + "line": 33, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 519, + 520 + ], + "loc": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 520, + 521 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 34, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 521, + 522 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 34, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 522, + 523 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 523, + 524 + ], + "loc": { + "start": { + "line": 34, + "column": 4 + }, + "end": { + "line": 34, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 524, + 525 + ], + "loc": { + "start": { + "line": 34, + "column": 5 + }, + "end": { + "line": 34, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 525, + 526 + ], + "loc": { + "start": { + "line": 34, + "column": 6 + }, + "end": { + "line": 34, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 527, + 528 + ], + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 35, + "column": 1 + }, + "end": { + "line": 35, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 529, + 530 + ], + "loc": { + "start": { + "line": 35, + "column": 2 + }, + "end": { + "line": 35, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 530, + 531 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 531, + 532 + ], + "loc": { + "start": { + "line": 35, + "column": 4 + }, + "end": { + "line": 35, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 532, + 533 + ], + "loc": { + "start": { + "line": 35, + "column": 5 + }, + "end": { + "line": 35, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 533, + 534 + ], + "loc": { + "start": { + "line": 35, + "column": 6 + }, + "end": { + "line": 35, + "column": 7 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Note: this file contains literal tab characters.", + "range": [ + 0, + 50 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 50 + } + } + }, + { + "type": "Block", + "value": " Space are ignored, and key parts can be quoted.", + "range": [ + 131, + 180 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 49 + } + } + } + ], + "range": [ + 0, + 535 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-value.json new file mode 100644 index 0000000..e75dc3b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/dotted-value.json @@ -0,0 +1,66 @@ +{ + "name": { + "first": "Arthur", + "last": "Dent" + }, + "many": { + "dots": { + "here": { + "dot": { + "dot": { + "dot": 42 + } + } + } + } + }, + "count": { + "a": 1, + "b": 2, + "c": 3, + "d": 4, + "e": 5, + "f": 6, + "g": 7, + "h": 8, + "i": 9, + "j": 10, + "k": 11, + "l": 12 + }, + "tbl": { + "a": { + "b": { + "c": 42.666 + } + } + }, + "a": { + "few": { + "dots": { + "polka": { + "dot": "again?", + "dance-with": "Dot" + } + } + } + }, + "arr": [ + { + "a": { + "b": { + "c": 1, + "d": 2 + } + } + }, + { + "a": { + "b": { + "c": 3, + "d": 4 + } + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-space-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-1-output.json similarity index 79% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-space-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-1-output.json index 79c0360..2a65ee0 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-space-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-1-output.json @@ -12,12 +12,12 @@ { "type": "TOMLQuoted", "kind": "string", - "value": "a b", + "value": "", "style": "basic", "multiline": false, "range": [ 0, - 5 + 2 ], "loc": { "start": { @@ -26,14 +26,14 @@ }, "end": { "line": 1, - "column": 5 + "column": 2 } } } ], "range": [ 0, - 5 + 2 ], "loc": { "start": { @@ -42,33 +42,34 @@ }, "end": { "line": 1, - "column": 5 + "column": 2 } } }, "value": { "type": "TOMLValue", - "kind": "integer", - "value": 1, - "number": "1", + "kind": "string", + "value": "blank", + "style": "basic", + "multiline": false, "range": [ - 8, - 9 + 5, + 12 ], "loc": { "start": { "line": 1, - "column": 8 + "column": 5 }, "end": { "line": 1, - "column": 9 + "column": 12 } } }, "range": [ 0, - 9 + 12 ], "loc": { "start": { @@ -77,14 +78,14 @@ }, "end": { "line": 1, - "column": 9 + "column": 12 } } } ], "range": [ 0, - 9 + 12 ], "loc": { "start": { @@ -93,7 +94,7 @@ }, "end": { "line": 1, - "column": 9 + "column": 12 } } } @@ -102,11 +103,11 @@ "tokens": [ { "type": "BasicString", - "value": "\"a b\"", - "string": "a b", + "value": "\"\"", + "string": "", "range": [ 0, - 5 + 2 ], "loc": { "start": { @@ -115,7 +116,7 @@ }, "end": { "line": 1, - "column": 5 + "column": 2 } } }, @@ -123,36 +124,36 @@ "type": "Punctuator", "value": "=", "range": [ - 6, - 7 + 3, + 4 ], "loc": { "start": { "line": 1, - "column": 6 + "column": 3 }, "end": { "line": 1, - "column": 7 + "column": 4 } } }, { - "type": "Integer", - "value": "1", - "number": 1, + "type": "BasicString", + "value": "\"blank\"", + "string": "blank", "range": [ - 8, - 9 + 5, + 12 ], "loc": { "start": { "line": 1, - "column": 8 + "column": 5 }, "end": { "line": 1, - "column": 9 + "column": 12 } } } @@ -160,7 +161,7 @@ "comments": [], "range": [ 0, - 10 + 13 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-1-value.json new file mode 100644 index 0000000..f078270 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-1-value.json @@ -0,0 +1,3 @@ +{ + "": "blank" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-2-output.json new file mode 100644 index 0000000..65afb70 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-2-output.json @@ -0,0 +1,176 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "literal", + "multiline": false, + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + } + ], + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "blank", + "style": "basic", + "multiline": false, + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "LiteralString", + "value": "''", + "string": "", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "BasicString", + "value": "\"blank\"", + "string": "blank", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + "comments": [], + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-2-value.json new file mode 100644 index 0000000..f078270 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-2-value.json @@ -0,0 +1,3 @@ +{ + "": "blank" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-3-output.json new file mode 100644 index 0000000..d0d985d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-3-output.json @@ -0,0 +1,175 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "literal", + "multiline": false, + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + } + ], + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "LiteralString", + "value": "''", + "string": "", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "0", + "number": 0, + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "comments": [], + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-3-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-3-value.json new file mode 100644 index 0000000..31c919d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/empty-3-value.json @@ -0,0 +1,3 @@ +{ + "": 0 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-equals-nospace-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/equals-nospace-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-equals-nospace-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/equals-nospace-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-equals-nospace-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/equals-nospace-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-equals-nospace-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/equals-nospace-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/escapes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/escapes-output.json new file mode 100644 index 0000000..aabce30 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/escapes-output.json @@ -0,0 +1,1117 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\n", + "style": "basic", + "multiline": false, + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "newline", + "style": "basic", + "multiline": false, + "range": [ + 7, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "range": [ + 0, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\b", + "style": "basic", + "multiline": false, + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "bell", + "style": "basic", + "multiline": false, + "range": [ + 24, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "À", + "style": "basic", + "multiline": false, + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "latin capital letter A with grave", + "style": "basic", + "multiline": false, + "range": [ + 42, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 46 + } + } + }, + "range": [ + 31, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 46 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\"", + "style": "basic", + "multiline": false, + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "just a quote", + "style": "basic", + "multiline": false, + "range": [ + 85, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 78, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "backsp\b\b", + "style": "basic", + "multiline": false, + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "resolvedKey": [ + "backsp\b\b" + ], + "body": [], + "range": [ + 101, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\"quoted\"", + "style": "basic", + "multiline": false, + "range": [ + 118, + 130 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "range": [ + 118, + 130 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "resolvedKey": [ + "\"quoted\"" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "quote", + "range": [ + 132, + 137 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + } + ], + "range": [ + 132, + 137 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "range": [ + 132, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + ], + "range": [ + 117, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "a.b", + "style": "basic", + "multiline": false, + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "À", + "style": "basic", + "multiline": false, + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + ], + "range": [ + 147, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "resolvedKey": [ + "a.b", + "À" + ], + "body": [], + "range": [ + 146, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + ], + "range": [ + 0, + 162 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "BasicString", + "value": "\"\\n\"", + "string": "\n", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"newline\"", + "string": "newline", + "range": [ + 7, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"\\b\"", + "string": "\b", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"bell\"", + "string": "bell", + "range": [ + 24, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u00c0\"", + "string": "À", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"latin capital letter A with grave\"", + "string": "latin capital letter A with grave", + "range": [ + 42, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 46 + } + } + }, + { + "type": "BasicString", + "value": "\"\\\"\"", + "string": "\"", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"just a quote\"", + "string": "just a quote", + "range": [ + 85, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\"backsp\\b\\b\"", + "string": "backsp\b\b", + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\"\\\"quoted\\\"\"", + "string": "\"quoted\"", + "range": [ + 118, + 130 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "quote", + "range": [ + 132, + 137 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\"a.b\"", + "string": "a.b", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u00c0\"", + "string": "À", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + ], + "comments": [], + "range": [ + 0, + 163 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/escapes-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/escapes-value.json new file mode 100644 index 0000000..ad39d16 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/escapes-value.json @@ -0,0 +1,13 @@ +{ + "\n": "newline", + "\b": "bell", + "À": "latin capital letter A with grave", + "\"": "just a quote", + "backsp\b\b": {}, + "\"quoted\"": { + "quote": true + }, + "a.b": { + "À": {} + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-dotted-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-dotted-output.json new file mode 100644 index 0000000..32340f2 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-dotted-output.json @@ -0,0 +1,225 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "1", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "2", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "1", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "2", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "comments": [], + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-dotted-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-dotted-value.json new file mode 100644 index 0000000..9df68e7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-dotted-value.json @@ -0,0 +1,5 @@ +{ + "1": { + "2": 3 + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-numeric-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-numeric-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-numeric-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-numeric-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/numeric-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/keys-with-dots-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-dots-output.json similarity index 99% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/keys-with-dots-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-dots-output.json index 5bfc9d6..d198489 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/keys-with-dots-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-dots-output.json @@ -1096,7 +1096,7 @@ "comments": [], "range": [ 0, - 111 + 112 ], "loc": { "start": { @@ -1104,8 +1104,8 @@ "column": 0 }, "end": { - "line": 10, - "column": 19 + "line": 11, + "column": 0 } } } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/keys-with-dots-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-dots-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/keys-with-dots-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-dots-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-unicode-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-unicode-output.json new file mode 100644 index 0000000..4b40a88 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-unicode-output.json @@ -0,0 +1,712 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\u0000", + "style": "basic", + "multiline": false, + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "null", + "style": "basic", + "multiline": false, + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 1, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\\u0000", + "style": "literal", + "multiline": false, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "different key", + "style": "basic", + "multiline": false, + "range": [ + 30, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 19, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\b \f A  € ÿ ퟿  ￿ 𐀀 􏿿", + "style": "basic", + "multiline": false, + "range": [ + 46, + 136 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 90 + } + } + } + ], + "range": [ + 46, + 136 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 90 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "escaped key", + "style": "basic", + "multiline": false, + "range": [ + 139, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 93 + }, + "end": { + "line": 4, + "column": 106 + } + } + }, + "range": [ + 46, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 106 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "style": "basic", + "multiline": false, + "range": [ + 154, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 154, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "basic key", + "style": "basic", + "multiline": false, + "range": [ + 176, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 154, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "l ~ € ÿ ퟿  ￿ 𐀀 􏿿", + "style": "literal", + "multiline": false, + "range": [ + 188, + 209 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + ], + "range": [ + 188, + 209 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "literal key", + "style": "basic", + "multiline": false, + "range": [ + 212, + 225 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 188, + 225 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 1, + 225 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "BasicString", + "value": "\"\\u0000\"", + "string": "\u0000", + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"null\"", + "string": "null", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "LiteralString", + "value": "'\\u0000'", + "string": "\\u0000", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"different key\"", + "string": "different key", + "range": [ + 30, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff\"", + "string": "\b \f A  € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 46, + 136 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 90 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 137, + 138 + ], + "loc": { + "start": { + "line": 4, + "column": 91 + }, + "end": { + "line": 4, + "column": 92 + } + } + }, + { + "type": "BasicString", + "value": "\"escaped key\"", + "string": "escaped key", + "range": [ + 139, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 93 + }, + "end": { + "line": 4, + "column": 106 + } + } + }, + { + "type": "BasicString", + "value": "\"~ € ÿ ퟿  ￿ 𐀀 􏿿\"", + "string": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 154, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "BasicString", + "value": "\"basic key\"", + "string": "basic key", + "range": [ + 176, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "LiteralString", + "value": "'l ~ € ÿ ퟿  ￿ 𐀀 􏿿'", + "string": "l ~ € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 188, + 209 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + { + "type": "BasicString", + "value": "\"literal key\"", + "string": "literal key", + "range": [ + 212, + 225 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "comments": [], + "range": [ + 0, + 226 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-unicode-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-unicode-value.json new file mode 100644 index 0000000..c22e1c9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/quoted-unicode-value.json @@ -0,0 +1,7 @@ +{ + "\u0000": "null", + "\\u0000": "different key", + "\b \f A  € ÿ ퟿  ￿ 𐀀 􏿿": "escaped key", + "~ € ÿ ퟿  ￿ 𐀀 􏿿": "basic key", + "l ~ € ÿ ퟿  ￿ 𐀀 􏿿": "literal key" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/space-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/space-output.json new file mode 100644 index 0000000..86a9814 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/space-output.json @@ -0,0 +1,579 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "a b", + "style": "basic", + "multiline": false, + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": " c d ", + "style": "basic", + "multiline": false, + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 67, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": " tbl ", + "style": "basic", + "multiline": false, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + ], + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "resolvedKey": [ + " tbl " + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "\ttab\ttab\t", + "style": "basic", + "multiline": false, + "range": [ + 92, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [ + 92, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "tab", + "style": "basic", + "multiline": false, + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 92, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "range": [ + 80, + 114 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "range": [ + 55, + 114 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "BasicString", + "value": "\"a b\"", + "string": "a b", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\" c d \"", + "string": " c d ", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\" tbl \"", + "string": " tbl ", + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\"\\ttab\\ttab\\t\"", + "string": "\ttab\ttab\t", + "range": [ + 92, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"tab\"", + "string": "tab", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Keep whitespace inside quotes keys at all positions.", + "range": [ + 0, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 54 + } + } + } + ], + "range": [ + 0, + 115 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/space-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/space-value.json new file mode 100644 index 0000000..0414e86 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/space-value.json @@ -0,0 +1,7 @@ +{ + "a b": 1, + " c d ": 2, + " tbl ": { + "\ttab\ttab\t": "tab" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-special-chars-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-chars-output.json similarity index 83% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-special-chars-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-chars-output.json index 4797649..8400afd 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key-special-chars-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-chars-output.json @@ -12,12 +12,12 @@ { "type": "TOMLQuoted", "kind": "string", - "value": "~!@$^&*()_+-`1234567890[]|/?><.,;:'", + "value": "=~!@$^&*()_+-`1234567890[]|/?><.,;:'=", "style": "basic", "multiline": false, "range": [ 0, - 37 + 39 ], "loc": { "start": { @@ -26,14 +26,14 @@ }, "end": { "line": 1, - "column": 37 + "column": 39 } } } ], "range": [ 0, - 37 + 39 ], "loc": { "start": { @@ -42,7 +42,7 @@ }, "end": { "line": 1, - "column": 37 + "column": 39 } } }, @@ -52,23 +52,23 @@ "value": 1, "number": "1", "range": [ - 40, - 41 + 42, + 43 ], "loc": { "start": { "line": 1, - "column": 40 + "column": 42 }, "end": { "line": 1, - "column": 41 + "column": 43 } } }, "range": [ 0, - 41 + 43 ], "loc": { "start": { @@ -77,14 +77,14 @@ }, "end": { "line": 1, - "column": 41 + "column": 43 } } } ], "range": [ 0, - 41 + 43 ], "loc": { "start": { @@ -93,7 +93,7 @@ }, "end": { "line": 1, - "column": 41 + "column": 43 } } } @@ -102,11 +102,11 @@ "tokens": [ { "type": "BasicString", - "value": "\"~!@$^&*()_+-`1234567890[]|/?><.,;:'\"", - "string": "~!@$^&*()_+-`1234567890[]|/?><.,;:'", + "value": "\"=~!@$^&*()_+-`1234567890[]|/?><.,;:'=\"", + "string": "=~!@$^&*()_+-`1234567890[]|/?><.,;:'=", "range": [ 0, - 37 + 39 ], "loc": { "start": { @@ -115,7 +115,7 @@ }, "end": { "line": 1, - "column": 37 + "column": 39 } } }, @@ -123,17 +123,17 @@ "type": "Punctuator", "value": "=", "range": [ - 38, - 39 + 40, + 41 ], "loc": { "start": { "line": 1, - "column": 38 + "column": 40 }, "end": { "line": 1, - "column": 39 + "column": 41 } } }, @@ -142,17 +142,17 @@ "value": "1", "number": 1, "range": [ - 40, - 41 + 42, + 43 ], "loc": { "start": { "line": 1, - "column": 40 + "column": 42 }, "end": { "line": 1, - "column": 41 + "column": 43 } } } @@ -160,7 +160,7 @@ "comments": [], "range": [ 0, - 42 + 44 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-chars-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-chars-value.json new file mode 100644 index 0000000..0fd480b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-chars-value.json @@ -0,0 +1,3 @@ +{ + "=~!@$^&*()_+-`1234567890[]|/?><.,;:'=": 1 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-word-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-word-output.json new file mode 100644 index 0000000..8da3f51 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-word-output.json @@ -0,0 +1,558 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "false", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": false, + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "true", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "inf", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + } + ], + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 100000000, + "number": "100000000", + "range": [ + 29, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "range": [ + 23, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nan", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "ceci n'est pas un nombre", + "style": "basic", + "multiline": false, + "range": [ + 45, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 39, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 0, + 71 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "false", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Boolean", + "value": "false", + "boolean": false, + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "true", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "inf", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "100000000", + "number": 100000000, + "range": [ + 29, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "nan", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"ceci n'est pas un nombre\"", + "string": "ceci n'est pas un nombre", + "range": [ + 45, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "comments": [], + "range": [ + 0, + 73 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-word-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-word-value.json new file mode 100644 index 0000000..a3e6df1 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/special-word-value.json @@ -0,0 +1,6 @@ +{ + "false": false, + "true": 1, + "inf": 100000000, + "nan": "ceci n'est pas un nombre" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/unicode-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/unicode-output.json new file mode 100644 index 0000000..2c39e3e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/unicode-output.json @@ -0,0 +1 @@ +"Unexpected character@line:3,column:0" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-integer-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/zero-output.json similarity index 79% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-integer-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/zero-output.json index 1637ec7..6975fba 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-integer-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/zero-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "million", + "name": "0", "range": [ 0, - 7 + 1 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 7 + "column": 1 } } } ], "range": [ 0, - 7 + 1 ], "loc": { "start": { @@ -39,33 +39,33 @@ }, "end": { "line": 1, - "column": 7 + "column": 1 } } }, "value": { "type": "TOMLValue", "kind": "integer", - "value": 1000000, - "number": "1000000", + "value": 0, + "number": "0", "range": [ - 10, - 19 + 2, + 3 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 2 }, "end": { "line": 1, - "column": 19 + "column": 3 } } }, "range": [ 0, - 19 + 3 ], "loc": { "start": { @@ -74,14 +74,14 @@ }, "end": { "line": 1, - "column": 19 + "column": 3 } } } ], "range": [ 0, - 19 + 3 ], "loc": { "start": { @@ -90,7 +90,7 @@ }, "end": { "line": 1, - "column": 19 + "column": 3 } } } @@ -99,10 +99,10 @@ "tokens": [ { "type": "Bare", - "value": "million", + "value": "0", "range": [ 0, - 7 + 1 ], "loc": { "start": { @@ -111,7 +111,7 @@ }, "end": { "line": 1, - "column": 7 + "column": 1 } } }, @@ -119,36 +119,36 @@ "type": "Punctuator", "value": "=", "range": [ - 8, - 9 + 1, + 2 ], "loc": { "start": { "line": 1, - "column": 8 + "column": 1 }, "end": { "line": 1, - "column": 9 + "column": 2 } } }, { "type": "Integer", - "value": "1_000_000", - "number": 1000000, + "value": "0", + "number": 0, "range": [ - 10, - 19 + 2, + 3 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 2 }, "end": { "line": 1, - "column": 19 + "column": 3 } } } @@ -156,7 +156,7 @@ "comments": [], "range": [ 0, - 20 + 4 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/zero-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/zero-value.json new file mode 100644 index 0000000..53974b1 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/key/zero-value.json @@ -0,0 +1,3 @@ +{ + "0": 0 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-integer-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-integer-value.json deleted file mode 100644 index 2c42c4a..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/long-integer-value.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "answer": 9223372036854776000, - "neganswer": -9223372036854776000 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-compact-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-compact-output.json new file mode 100644 index 0000000..7ed2e5b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-compact-output.json @@ -0,0 +1,3175 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "title", + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "TOML Example", + "style": "basic", + "multiline": false, + "range": [ + 34, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 28, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "owner", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "resolvedKey": [ + "owner" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 57, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 57, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Lance Uppercut", + "style": "basic", + "multiline": false, + "range": [ + 62, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 57, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dob", + "range": [ + 79, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ], + "range": [ + 79, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1979-05-27T15:32:00.000Z", + "datetime": "1979-05-27T07:32:00-08:00", + "range": [ + 83, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "range": [ + 79, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "range": [ + 49, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "database", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "resolvedKey": [ + "database" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "server", + "range": [ + 138, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + } + ], + "range": [ + 138, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "192.168.1.1", + "style": "basic", + "multiline": false, + "range": [ + 145, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 138, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ports", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 8001, + "number": "8001", + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 8001, + "number": "8001", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 8002, + "number": "8002", + "range": [ + 176, + 180 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 21 + } + } + } + ], + "range": [ + 165, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + "range": [ + 159, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "connection_max", + "range": [ + 182, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + ], + "range": [ + 182, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 5000, + "number": "5000", + "range": [ + 197, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + "range": [ + 182, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "enabled", + "range": [ + 202, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + ], + "range": [ + 202, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 210, + 214 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 202, + 214 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + ], + "range": [ + 127, + 214 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "servers", + "range": [ + 216, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + ], + "range": [ + 216, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "resolvedKey": [ + "servers" + ], + "body": [], + "range": [ + 215, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "servers", + "range": [ + 226, + 233 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "alpha", + "range": [ + 234, + 239 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 14 + } + } + } + ], + "range": [ + 226, + 239 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "resolvedKey": [ + "servers", + "alpha" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ip", + "range": [ + 241, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + ], + "range": [ + 241, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "10.0.0.1", + "style": "basic", + "multiline": false, + "range": [ + 244, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + "range": [ + 241, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dc", + "range": [ + 255, + 257 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + ], + "range": [ + 255, + 257 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "eqdc10", + "style": "basic", + "multiline": false, + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "range": [ + 255, + 266 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 11 + } + } + } + ], + "range": [ + 225, + 266 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "servers", + "range": [ + 268, + 275 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "beta", + "range": [ + 276, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 268, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "resolvedKey": [ + "servers", + "beta" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ip", + "range": [ + 282, + 284 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 2 + } + } + } + ], + "range": [ + 282, + 284 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "10.0.0.2", + "style": "basic", + "multiline": false, + "range": [ + 285, + 295 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "range": [ + 282, + 295 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dc", + "range": [ + 296, + 298 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 2 + } + } + } + ], + "range": [ + 296, + 298 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "eqdc10", + "style": "basic", + "multiline": false, + "range": [ + 299, + 307 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "range": [ + 296, + 307 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + ], + "range": [ + 267, + 307 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "clients", + "range": [ + 309, + 316 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 8 + } + } + } + ], + "range": [ + 309, + 316 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "resolvedKey": [ + "clients" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "data", + "range": [ + 318, + 322 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + } + ], + "range": [ + 318, + 322 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "gamma", + "style": "basic", + "multiline": false, + "range": [ + 325, + 332 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "delta", + "style": "basic", + "multiline": false, + "range": [ + 333, + 340 + ], + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 22 + } + } + } + ], + "range": [ + 324, + 341 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 343, + 344 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 26 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 28 + } + } + } + ], + "range": [ + 342, + 347 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 29 + } + } + } + ], + "range": [ + 323, + 348 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "range": [ + 318, + 348 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hosts", + "range": [ + 349, + 354 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 5 + } + } + } + ], + "range": [ + 349, + 354 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "alpha", + "style": "basic", + "multiline": false, + "range": [ + 357, + 364 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 7 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "omega", + "style": "basic", + "multiline": false, + "range": [ + 366, + 373 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 7 + } + } + } + ], + "range": [ + 355, + 375 + ], + "loc": { + "start": { + "line": 20, + "column": 6 + }, + "end": { + "line": 23, + "column": 1 + } + } + }, + "range": [ + 349, + 375 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + } + ], + "range": [ + 308, + 375 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + } + ], + "range": [ + 28, + 375 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "title", + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"TOML Example\"", + "string": "TOML Example", + "range": [ + 34, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "owner", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 57, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"Lance Uppercut\"", + "string": "Lance Uppercut", + "range": [ + 62, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "dob", + "range": [ + 79, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1979-05-27T07:32:00-08:00", + "range": [ + 83, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "database", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "server", + "range": [ + 138, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"192.168.1.1\"", + "string": "192.168.1.1", + "range": [ + 145, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "ports", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Integer", + "value": "8001", + "number": 8001, + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Integer", + "value": "8001", + "number": 8001, + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "Integer", + "value": "8002", + "number": 8002, + "range": [ + 176, + 180 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "connection_max", + "range": [ + 182, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 196, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "5000", + "number": 5000, + "range": [ + 197, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "enabled", + "range": [ + 202, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 210, + 214 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "servers", + "range": [ + 216, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 223, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "servers", + "range": [ + 226, + 233 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 233, + 234 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "alpha", + "range": [ + 234, + 239 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "ip", + "range": [ + 241, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 243, + 244 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"10.0.0.1\"", + "string": "10.0.0.1", + "range": [ + 244, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "dc", + "range": [ + 255, + 257 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"eqdc10\"", + "string": "eqdc10", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "servers", + "range": [ + 268, + 275 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "beta", + "range": [ + 276, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 280, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "ip", + "range": [ + 282, + 284 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"10.0.0.2\"", + "string": "10.0.0.2", + "range": [ + 285, + 295 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "dc", + "range": [ + 296, + 298 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 298, + 299 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"eqdc10\"", + "string": "eqdc10", + "range": [ + 299, + 307 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "clients", + "range": [ + 309, + 316 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 316, + 317 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "data", + "range": [ + 318, + 322 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 323, + 324 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"gamma\"", + "string": "gamma", + "range": [ + 325, + 332 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + { + "type": "BasicString", + "value": "\"delta\"", + "string": "delta", + "range": [ + 333, + 340 + ], + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 340, + 341 + ], + "loc": { + "start": { + "line": 19, + "column": 22 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 341, + 342 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 342, + 343 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 343, + 344 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 344, + 345 + ], + "loc": { + "start": { + "line": 19, + "column": 26 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 346, + 347 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 19, + "column": 29 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "hosts", + "range": [ + 349, + 354 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 354, + 355 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 355, + 356 + ], + "loc": { + "start": { + "line": 20, + "column": 6 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"alpha\"", + "string": "alpha", + "range": [ + 357, + 364 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 364, + 365 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"omega\"", + "string": "omega", + "range": [ + 366, + 373 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 374, + 375 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 1 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": "Useless spaces eliminated.", + "range": [ + 0, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + { + "type": "Block", + "value": "First class dates", + "range": [ + 108, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 47 + } + } + } + ], + "range": [ + 0, + 376 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-compact-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-compact-value.json new file mode 100644 index 0000000..9815ed0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-compact-value.json @@ -0,0 +1,43 @@ +{ + "title": "TOML Example", + "owner": { + "name": "Lance Uppercut", + "dob": "1979-05-27T15:32:00.000Z" + }, + "database": { + "server": "192.168.1.1", + "ports": [ + 8001, + 8001, + 8002 + ], + "connection_max": 5000, + "enabled": true + }, + "servers": { + "alpha": { + "ip": "10.0.0.1", + "dc": "eqdc10" + }, + "beta": { + "ip": "10.0.0.2", + "dc": "eqdc10" + } + }, + "clients": { + "data": [ + [ + "gamma", + "delta" + ], + [ + 1, + 2 + ] + ], + "hosts": [ + "alpha", + "omega" + ] + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-output.json new file mode 100644 index 0000000..30c8a8e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-output.json @@ -0,0 +1,3211 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "title", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + } + ], + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "TOML Example", + "style": "basic", + "multiline": false, + "range": [ + 42, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 34, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "owner", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + ], + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "resolvedKey": [ + "owner" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + } + ], + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Lance Uppercut", + "style": "basic", + "multiline": false, + "range": [ + 73, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "range": [ + 66, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dob", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1979-05-27T15:32:00.000Z", + "datetime": "1979-05-27T07:32:00-08:00", + "range": [ + 96, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "range": [ + 90, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + ], + "range": [ + 58, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "database", + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + ], + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "resolvedKey": [ + "database" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "server", + "range": [ + 164, + 170 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 6 + } + } + } + ], + "range": [ + 164, + 170 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "192.168.1.1", + "style": "basic", + "multiline": false, + "range": [ + 173, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 164, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ports", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + } + ], + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 8001, + "number": "8001", + "range": [ + 197, + 201 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 8001, + "number": "8001", + "range": [ + 203, + 207 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 8002, + "number": "8002", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 26 + } + } + } + ], + "range": [ + 195, + 215 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "range": [ + 187, + 215 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "connection_max", + "range": [ + 216, + 230 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 14 + } + } + } + ], + "range": [ + 216, + 230 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 5000, + "number": "5000", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "range": [ + 216, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "enabled", + "range": [ + 238, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 7 + } + } + } + ], + "range": [ + 238, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 248, + 252 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "range": [ + 238, + 252 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + ], + "range": [ + 153, + 252 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "servers", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 8 + } + } + } + ], + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "resolvedKey": [ + "servers" + ], + "body": [], + "range": [ + 254, + 263 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "servers", + "range": [ + 335, + 342 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": "TOMLBare", + "name": "alpha", + "range": [ + 343, + 348 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 16 + } + } + } + ], + "range": [ + 335, + 348 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "resolvedKey": [ + "servers", + "alpha" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ip", + "range": [ + 352, + 354 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 4 + } + } + } + ], + "range": [ + 352, + 354 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "10.0.0.1", + "style": "basic", + "multiline": false, + "range": [ + 357, + 367 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "range": [ + 352, + 367 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dc", + "range": [ + 370, + 372 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 370, + 372 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "eqdc10", + "style": "basic", + "multiline": false, + "range": [ + 375, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "range": [ + 370, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 334, + 383 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "servers", + "range": [ + 388, + 395 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 10 + } + } + }, + { + "type": "TOMLBare", + "name": "beta", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 22, + "column": 11 + }, + "end": { + "line": 22, + "column": 15 + } + } + } + ], + "range": [ + 388, + 400 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "resolvedKey": [ + "servers", + "beta" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ip", + "range": [ + 404, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + } + ], + "range": [ + 404, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "10.0.0.2", + "style": "basic", + "multiline": false, + "range": [ + 409, + 419 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + "range": [ + 404, + 419 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dc", + "range": [ + 422, + 424 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 4 + } + } + } + ], + "range": [ + 422, + 424 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "eqdc10", + "style": "basic", + "multiline": false, + "range": [ + 427, + 435 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 15 + } + } + }, + "range": [ + 422, + 435 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 15 + } + } + } + ], + "range": [ + 387, + 435 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 24, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "clients", + "range": [ + 438, + 445 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 8 + } + } + } + ], + "range": [ + 438, + 445 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + "resolvedKey": [ + "clients" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "data", + "range": [ + 447, + 451 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 4 + } + } + } + ], + "range": [ + 447, + 451 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "gamma", + "style": "basic", + "multiline": false, + "range": [ + 457, + 464 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "delta", + "style": "basic", + "multiline": false, + "range": [ + 466, + 473 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 26 + } + } + } + ], + "range": [ + 456, + 474 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 27 + } + } + }, + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 27, + "column": 30 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 27, + "column": 33 + }, + "end": { + "line": 27, + "column": 34 + } + } + } + ], + "range": [ + 476, + 482 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 35 + } + } + } + ], + "range": [ + 454, + 484 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 37 + } + } + }, + "range": [ + 447, + 484 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 37 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hosts", + "range": [ + 526, + 531 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 5 + } + } + } + ], + "range": [ + 526, + 531 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "alpha", + "style": "basic", + "multiline": false, + "range": [ + 538, + 545 + ], + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "omega", + "style": "basic", + "multiline": false, + "range": [ + 549, + 556 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 9 + } + } + } + ], + "range": [ + 534, + 558 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 33, + "column": 1 + } + } + }, + "range": [ + 526, + 558 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + } + } + ], + "range": [ + 437, + 558 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + } + } + ], + "range": [ + 34, + 558 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "title", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"TOML Example\"", + "string": "TOML Example", + "range": [ + 42, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "owner", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Lance Uppercut\"", + "string": "Lance Uppercut", + "range": [ + 73, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "dob", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1979-05-27T07:32:00-08:00", + "range": [ + 96, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "database", + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "server", + "range": [ + 164, + 170 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"192.168.1.1\"", + "string": "192.168.1.1", + "range": [ + 173, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "ports", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "Integer", + "value": "8001", + "number": 8001, + "range": [ + 197, + 201 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "8001", + "number": 8001, + "range": [ + 203, + 207 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + { + "type": "Integer", + "value": "8002", + "number": 8002, + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + { + "type": "Bare", + "value": "connection_max", + "range": [ + 216, + 230 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + { + "type": "Integer", + "value": "5000", + "number": 5000, + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "enabled", + "range": [ + 238, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 248, + 252 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 254, + 255 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "servers", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "servers", + "range": [ + 335, + 342 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 342, + 343 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "alpha", + "range": [ + 343, + 348 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "ip", + "range": [ + 352, + 354 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 355, + 356 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"10.0.0.1\"", + "string": "10.0.0.1", + "range": [ + 357, + 367 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "dc", + "range": [ + 370, + 372 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 373, + 374 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"eqdc10\"", + "string": "eqdc10", + "range": [ + 375, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "servers", + "range": [ + 388, + 395 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 395, + 396 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "beta", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 22, + "column": 11 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 400, + 401 + ], + "loc": { + "start": { + "line": 22, + "column": 15 + }, + "end": { + "line": 22, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "ip", + "range": [ + 404, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 407, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"10.0.0.2\"", + "string": "10.0.0.2", + "range": [ + 409, + 419 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "dc", + "range": [ + 422, + 424 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 425, + 426 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"eqdc10\"", + "string": "eqdc10", + "range": [ + 427, + 435 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 437, + 438 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "clients", + "range": [ + 438, + 445 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 445, + 446 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "data", + "range": [ + 447, + 451 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 452, + 453 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 454, + 455 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"gamma\"", + "string": "gamma", + "range": [ + 457, + 464 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 464, + 465 + ], + "loc": { + "start": { + "line": 27, + "column": 17 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + { + "type": "BasicString", + "value": "\"delta\"", + "string": "delta", + "range": [ + 466, + 473 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 473, + 474 + ], + "loc": { + "start": { + "line": 27, + "column": 26 + }, + "end": { + "line": 27, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 474, + 475 + ], + "loc": { + "start": { + "line": 27, + "column": 27 + }, + "end": { + "line": 27, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 30 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 27, + "column": 30 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 478, + 479 + ], + "loc": { + "start": { + "line": 27, + "column": 31 + }, + "end": { + "line": 27, + "column": 32 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 27, + "column": 33 + }, + "end": { + "line": 27, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 27, + "column": 34 + }, + "end": { + "line": 27, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 483, + 484 + ], + "loc": { + "start": { + "line": 27, + "column": 36 + }, + "end": { + "line": 27, + "column": 37 + } + } + }, + { + "type": "Bare", + "value": "hosts", + "range": [ + 526, + 531 + ], + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 532, + 533 + ], + "loc": { + "start": { + "line": 30, + "column": 6 + }, + "end": { + "line": 30, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 534, + 535 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"alpha\"", + "string": "alpha", + "range": [ + 538, + 545 + ], + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 545, + 546 + ], + "loc": { + "start": { + "line": 31, + "column": 9 + }, + "end": { + "line": 31, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"omega\"", + "string": "omega", + "range": [ + 549, + 556 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " This is a TOML document. Boom.", + "range": [ + 0, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + { + "type": "Block", + "value": " First class dates? Why not?", + "range": [ + 122, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 61 + } + } + }, + { + "type": "Block", + "value": " You can indent as you please. Tabs or spaces. TOML don't care.", + "range": [ + 267, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 66 + } + } + }, + { + "type": "Block", + "value": " Line breaks are OK when inside arrays", + "range": [ + 486, + 525 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 39 + } + } + } + ], + "range": [ + 0, + 559 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-value.json new file mode 100644 index 0000000..9815ed0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec-example-1-value.json @@ -0,0 +1,43 @@ +{ + "title": "TOML Example", + "owner": { + "name": "Lance Uppercut", + "dob": "1979-05-27T15:32:00.000Z" + }, + "database": { + "server": "192.168.1.1", + "ports": [ + 8001, + 8001, + 8002 + ], + "connection_max": 5000, + "enabled": true + }, + "servers": { + "alpha": { + "ip": "10.0.0.1", + "dc": "eqdc10" + }, + "beta": { + "ip": "10.0.0.2", + "dc": "eqdc10" + } + }, + "clients": { + "data": [ + [ + "gamma", + "delta" + ], + [ + 1, + 2 + ] + ], + "hosts": [ + "alpha", + "omega" + ] + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-0-output.json new file mode 100644 index 0000000..a6ac8f5 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-0-output.json @@ -0,0 +1,3219 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "integers", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + "range": [ + 11, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "range": [ + 0, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "colors", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "yellow", + "style": "basic", + "multiline": false, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "green", + "style": "basic", + "multiline": false, + "range": [ + 51, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 35 + } + } + } + ], + "range": [ + 32, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 23, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nested_arrays_of_ints", + "range": [ + 61, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "range": [ + 61, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 87, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 37 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 5, + "number": "5", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 43 + }, + "end": { + "line": 3, + "column": 44 + } + } + } + ], + "range": [ + 97, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 85, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "range": [ + 61, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nested_mixed_array", + "range": [ + 109, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "range": [ + 109, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 137, + 138 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "range": [ + 132, + 140 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "b", + "style": "basic", + "multiline": false, + "range": [ + 148, + 151 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "c", + "style": "basic", + "multiline": false, + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 4, + "column": 47 + } + } + } + ], + "range": [ + 142, + 157 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 48 + } + } + } + ], + "range": [ + 130, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 50 + } + } + }, + "range": [ + 109, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 50 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "string_array", + "range": [ + 160, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + ], + "range": [ + 160, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "all", + "style": "basic", + "multiline": false, + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "strings", + "style": "literal", + "multiline": false, + "range": [ + 184, + 193 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "are the same", + "style": "basic", + "multiline": true, + "range": [ + 195, + 213 + ], + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 5, + "column": 53 + } + } + }, + { + "type": "TOMLValue", + "kind": "string", + "value": "type", + "style": "literal", + "multiline": true, + "range": [ + 215, + 225 + ], + "loc": { + "start": { + "line": 5, + "column": 55 + }, + "end": { + "line": 5, + "column": 65 + } + } + } + ], + "range": [ + 175, + 227 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 67 + } + } + }, + "range": [ + 160, + 227 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 67 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "numbers", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + ], + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "float", + "value": 0.1, + "number": "0.1", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "TOMLValue", + "kind": "float", + "value": 0.2, + "number": "0.2", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "TOMLValue", + "kind": "float", + "value": 0.5, + "number": "0.5", + "range": [ + 283, + 286 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 288, + 289 + ], + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 28 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 5, + "number": "5", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 8, + "column": 33 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "range": [ + 271, + 297 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "range": [ + 261, + 297 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "contributors", + "range": [ + 298, + 310 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + ], + "range": [ + 298, + 310 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "string", + "value": "Foo Bar ", + "style": "basic", + "multiline": false, + "range": [ + 317, + 344 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + ], + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Baz Qux", + "style": "basic", + "multiline": false, + "range": [ + 357, + 366 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + "range": [ + 350, + 366 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "email", + "range": [ + 368, + 373 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 27 + } + } + } + ], + "range": [ + 368, + 373 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "bazqux@example.com", + "style": "basic", + "multiline": false, + "range": [ + 376, + 396 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + "range": [ + 368, + 396 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "url", + "range": [ + 398, + 401 + ], + "loc": { + "start": { + "line": 11, + "column": 52 + }, + "end": { + "line": 11, + "column": 55 + } + } + } + ], + "range": [ + 398, + 401 + ], + "loc": { + "start": { + "line": 11, + "column": 52 + }, + "end": { + "line": 11, + "column": 55 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "https://example.com/bazqux", + "style": "basic", + "multiline": false, + "range": [ + 404, + 432 + ], + "loc": { + "start": { + "line": 11, + "column": 58 + }, + "end": { + "line": 11, + "column": 86 + } + } + }, + "range": [ + 398, + 432 + ], + "loc": { + "start": { + "line": 11, + "column": 52 + }, + "end": { + "line": 11, + "column": 86 + } + } + } + ], + "range": [ + 348, + 434 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 88 + } + } + } + ], + "range": [ + 313, + 436 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + "range": [ + 298, + 436 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + } + ], + "range": [ + 0, + 436 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "integers", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "colors", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "BasicString", + "value": "\"yellow\"", + "string": "yellow", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "BasicString", + "value": "\"green\"", + "string": "green", + "range": [ + 51, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 36 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + { + "type": "Bare", + "value": "nested_arrays_of_ints", + "range": [ + 61, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 37 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + { + "type": "Integer", + "value": "5", + "number": 5, + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 43 + }, + "end": { + "line": 3, + "column": 44 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 44 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + { + "type": "Bare", + "value": "nested_mixed_array", + "range": [ + 109, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 137, + 138 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "BasicString", + "value": "\"a\"", + "string": "a", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 38 + } + } + }, + { + "type": "BasicString", + "value": "\"b\"", + "string": "b", + "range": [ + 148, + 151 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 4, + "column": 42 + }, + "end": { + "line": 4, + "column": 43 + } + } + }, + { + "type": "BasicString", + "value": "\"c\"", + "string": "c", + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 4, + "column": 47 + }, + "end": { + "line": 4, + "column": 48 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 158, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 4, + "column": 50 + } + } + }, + { + "type": "Bare", + "value": "string_array", + "range": [ + 160, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"all\"", + "string": "all", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "LiteralString", + "value": "'strings'", + "string": "strings", + "range": [ + 184, + 193 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"are the same\"\"\"", + "string": "are the same", + "range": [ + 195, + 213 + ], + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 5, + "column": 53 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 5, + "column": 53 + }, + "end": { + "line": 5, + "column": 54 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''type'''", + "string": "type", + "range": [ + 215, + 225 + ], + "loc": { + "start": { + "line": 5, + "column": 55 + }, + "end": { + "line": 5, + "column": 65 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 5, + "column": 66 + }, + "end": { + "line": 5, + "column": 67 + } + } + }, + { + "type": "Bare", + "value": "numbers", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "Float", + "value": "0.1", + "number": 0.1, + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "Float", + "value": "0.2", + "number": 0.2, + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "Float", + "value": "0.5", + "number": 0.5, + "range": [ + 283, + 286 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 286, + 287 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 26 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 288, + 289 + ], + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 29 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 292, + 293 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + { + "type": "Integer", + "value": "5", + "number": 5, + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 8, + "column": 33 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 296, + 297 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + { + "type": "Bare", + "value": "contributors", + "range": [ + 298, + 310 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 311, + 312 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 313, + 314 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"Foo Bar \"", + "string": "Foo Bar ", + "range": [ + 317, + 344 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 344, + 345 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 355, + 356 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"Baz Qux\"", + "string": "Baz Qux", + "range": [ + 357, + 366 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "email", + "range": [ + 368, + 373 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 374, + 375 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + { + "type": "BasicString", + "value": "\"bazqux@example.com\"", + "string": "bazqux@example.com", + "range": [ + 376, + 396 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 396, + 397 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 51 + } + } + }, + { + "type": "Bare", + "value": "url", + "range": [ + 398, + 401 + ], + "loc": { + "start": { + "line": 11, + "column": 52 + }, + "end": { + "line": 11, + "column": 55 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 402, + 403 + ], + "loc": { + "start": { + "line": 11, + "column": 56 + }, + "end": { + "line": 11, + "column": 57 + } + } + }, + { + "type": "BasicString", + "value": "\"https://example.com/bazqux\"", + "string": "https://example.com/bazqux", + "range": [ + 404, + 432 + ], + "loc": { + "start": { + "line": 11, + "column": 58 + }, + "end": { + "line": 11, + "column": 86 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 433, + 434 + ], + "loc": { + "start": { + "line": 11, + "column": 87 + }, + "end": { + "line": 11, + "column": 88 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 435, + 436 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Mixed-type arrays are allowed", + "range": [ + 229, + 260 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + ], + "range": [ + 0, + 437 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-0-value.json new file mode 100644 index 0000000..44d44ef --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-0-value.json @@ -0,0 +1,56 @@ +{ + "integers": [ + 1, + 2, + 3 + ], + "colors": [ + "red", + "yellow", + "green" + ], + "nested_arrays_of_ints": [ + [ + 1, + 2 + ], + [ + 3, + 4, + 5 + ] + ], + "nested_mixed_array": [ + [ + 1, + 2 + ], + [ + "a", + "b", + "c" + ] + ], + "string_array": [ + "all", + "strings", + "are the same", + "type" + ], + "numbers": [ + 0.1, + 0.2, + 0.5, + 1, + 2, + 5 + ], + "contributors": [ + "Foo Bar ", + { + "name": "Baz Qux", + "email": "bazqux@example.com", + "url": "https://example.com/bazqux" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-1-output.json new file mode 100644 index 0000000..e9c1be7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-1-output.json @@ -0,0 +1,618 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "integers2", + "range": [ + 0, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + } + } + ], + "range": [ + 0, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "range": [ + 12, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "integers3", + "range": [ + 27, + 36 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + ], + "range": [ + 27, + 36 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "range": [ + 39, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "range": [ + 27, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "range": [ + 0, + 65 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "integers2", + "range": [ + 0, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "integers3", + "range": [ + 27, + 36 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " this is ok", + "range": [ + 51, + 63 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + ], + "range": [ + 0, + 66 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-1-value.json new file mode 100644 index 0000000..fe293a2 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-1-value.json @@ -0,0 +1,11 @@ +{ + "integers2": [ + 1, + 2, + 3 + ], + "integers3": [ + 1, + 2 + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-0-output.json new file mode 100644 index 0000000..53b1b4f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-0-output.json @@ -0,0 +1,1161 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "products", + "range": [ + 2, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 10 + } + } + } + ], + "range": [ + 2, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "resolvedKey": [ + "products", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Hammer", + "style": "basic", + "multiline": false, + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 13, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sku", + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + } + ], + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 738594937, + "number": "738594937", + "range": [ + 35, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "range": [ + 29, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ], + "range": [ + 0, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "products", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + ], + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "resolvedKey": [ + "products", + 1 + ], + "body": [], + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "products", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "resolvedKey": [ + "products", + 2 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Nail", + "style": "basic", + "multiline": false, + "range": [ + 112, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "range": [ + 105, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sku", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + ], + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 284758393, + "number": "284758393", + "range": [ + 125, + 134 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "color", + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + } + ], + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "gray", + "style": "basic", + "multiline": false, + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + "range": [ + 136, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "range": [ + 92, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "range": [ + 0, + 150 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "products", + "range": [ + 2, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Hammer\"", + "string": "Hammer", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "sku", + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "738594937", + "number": 738594937, + "range": [ + 35, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "products", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "products", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Nail\"", + "string": "Nail", + "range": [ + 112, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "sku", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "284758393", + "number": 284758393, + "range": [ + 125, + 134 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"gray\"", + "string": "gray", + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " empty table within the array", + "range": [ + 60, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 44 + } + } + } + ], + "range": [ + 0, + 151 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-0-value.json new file mode 100644 index 0000000..15eb5ce --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-0-value.json @@ -0,0 +1,14 @@ +{ + "products": [ + { + "name": "Hammer", + "sku": 738594937 + }, + {}, + { + "name": "Nail", + "sku": 284758393, + "color": "gray" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-1-output.json new file mode 100644 index 0000000..10da1c4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-1-output.json @@ -0,0 +1,2082 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruits", + "range": [ + 2, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 2, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "resolvedKey": [ + "fruits", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "apple", + "style": "basic", + "multiline": false, + "range": [ + 18, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 11, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruits", + "range": [ + 28, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "TOMLBare", + "name": "physical", + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "range": [ + 28, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "resolvedKey": [ + "fruits", + 0, + "physical" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "shape", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + } + } + ], + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "round", + "style": "basic", + "multiline": false, + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 71, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "range": [ + 27, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruits", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "varieties", + "range": [ + 97, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 18 + } + } + } + ], + "range": [ + 90, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "resolvedKey": [ + "fruits", + 0, + "varieties", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red delicious", + "style": "basic", + "multiline": false, + "range": [ + 142, + 157 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "range": [ + 135, + 157 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 22 + } + } + } + ], + "range": [ + 88, + 157 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruits", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "varieties", + "range": [ + 168, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + ], + "range": [ + 161, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "resolvedKey": [ + "fruits", + 0, + "varieties", + 1 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "granny smith", + "style": "basic", + "multiline": false, + "range": [ + 187, + 201 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "range": [ + 180, + 201 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 21 + } + } + } + ], + "range": [ + 159, + 201 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruits", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + } + ], + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "resolvedKey": [ + "fruits", + 1 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 215, + 219 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 4 + } + } + } + ], + "range": [ + 215, + 219 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "banana", + "style": "basic", + "multiline": false, + "range": [ + 222, + 230 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "range": [ + 215, + 230 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 15 + } + } + } + ], + "range": [ + 204, + 230 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruits", + "range": [ + 234, + 240 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "varieties", + "range": [ + 241, + 250 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 18 + } + } + } + ], + "range": [ + 234, + 250 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 18 + } + } + }, + "resolvedKey": [ + "fruits", + 1, + "varieties", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 253, + 257 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + } + ], + "range": [ + 253, + 257 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "plantain", + "style": "basic", + "multiline": false, + "range": [ + 260, + 270 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "range": [ + 253, + 270 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "range": [ + 232, + 270 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "range": [ + 0, + 270 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "fruits", + "range": [ + 2, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"apple\"", + "string": "apple", + "range": [ + 18, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruits", + "range": [ + 28, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "physical", + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "shape", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"round\"", + "string": "round", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "fruits", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "varieties", + "range": [ + 97, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"red delicious\"", + "string": "red delicious", + "range": [ + 142, + 157 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 160, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "fruits", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "varieties", + "range": [ + 168, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"granny smith\"", + "string": "granny smith", + "range": [ + 187, + 201 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "fruits", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 215, + 219 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 220, + 221 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"banana\"", + "string": "banana", + "range": [ + 222, + 230 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 233, + 234 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "fruits", + "range": [ + 234, + 240 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "varieties", + "range": [ + 241, + 250 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 18, + "column": 19 + }, + "end": { + "line": 18, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 253, + 257 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"plantain\"", + "string": "plantain", + "range": [ + 260, + 270 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " subtable", + "range": [ + 46, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + { + "type": "Block", + "value": " nested array of tables", + "range": [ + 110, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 46 + } + } + } + ], + "range": [ + 0, + 271 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-1-value.json new file mode 100644 index 0000000..2f12f28 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-1-value.json @@ -0,0 +1,27 @@ +{ + "fruits": [ + { + "name": "apple", + "physical": { + "color": "red", + "shape": "round" + }, + "varieties": [ + { + "name": "red delicious" + }, + { + "name": "granny smith" + } + ] + }, + { + "name": "banana", + "varieties": [ + { + "name": "plantain" + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-2-output.json new file mode 100644 index 0000000..6111f4f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-2-output.json @@ -0,0 +1,1657 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "points", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "value": { + "type": "TOMLArray", + "elements": [ + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "y", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + } + } + ], + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "z", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + } + ], + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "range": [ + 27, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 32 + } + } + } + ], + "range": [ + 11, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 7, + "number": "7", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "y", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 8, + "number": "8", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "z", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 9, + "number": "9", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "range": [ + 47, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "y", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 4, + "number": "4", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "z", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 28 + } + } + } + ], + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 8, + "number": "8", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 83, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + ], + "range": [ + 9, + 108 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "range": [ + 0, + 108 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "range": [ + 0, + 108 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "points", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Bare", + "value": "z", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Integer", + "value": "7", + "number": 7, + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Integer", + "value": "8", + "number": 8, + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": "Bare", + "value": "z", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Integer", + "value": "9", + "number": 9, + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Integer", + "value": "4", + "number": 4, + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "Bare", + "value": "z", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Integer", + "value": "8", + "number": 8, + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "comments": [], + "range": [ + 0, + 109 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-2-value.json new file mode 100644 index 0000000..59c1033 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/array-of-tables-2-value.json @@ -0,0 +1,19 @@ +{ + "points": [ + { + "x": 1, + "y": 2, + "z": 3 + }, + { + "x": 7, + "y": 8, + "z": 9 + }, + { + "x": 2, + "y": 4, + "z": 8 + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/boolean-0-output.json similarity index 77% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-escape-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/boolean-0-output.json index fed9302..ed023a7 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-escape-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/boolean-0-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "answer4", + "name": "bool1", "range": [ 0, - 7 + 5 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 7 + "column": 5 } } } ], "range": [ 0, - 7 + 5 ], "loc": { "start": { @@ -39,34 +39,32 @@ }, "end": { "line": 1, - "column": 7 + "column": 5 } } }, "value": { "type": "TOMLValue", - "kind": "string", - "value": "δ", - "style": "basic", - "multiline": false, + "kind": "boolean", + "value": true, "range": [ - 10, - 18 + 8, + 12 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 8 }, "end": { "line": 1, - "column": 18 + "column": 12 } } }, "range": [ 0, - 18 + 12 ], "loc": { "start": { @@ -75,7 +73,7 @@ }, "end": { "line": 1, - "column": 18 + "column": 12 } } }, @@ -86,10 +84,10 @@ "keys": [ { "type": "TOMLBare", - "name": "answer8", + "name": "bool2", "range": [ - 19, - 26 + 13, + 18 ], "loc": { "start": { @@ -98,14 +96,14 @@ }, "end": { "line": 2, - "column": 7 + "column": 5 } } } ], "range": [ - 19, - 26 + 13, + 18 ], "loc": { "start": { @@ -114,34 +112,32 @@ }, "end": { "line": 2, - "column": 7 + "column": 5 } } }, "value": { "type": "TOMLValue", - "kind": "string", - "value": "δ", - "style": "basic", - "multiline": false, + "kind": "boolean", + "value": false, "range": [ - 29, - 41 + 21, + 26 ], "loc": { "start": { "line": 2, - "column": 10 + "column": 8 }, "end": { "line": 2, - "column": 22 + "column": 13 } } }, "range": [ - 19, - 41 + 13, + 26 ], "loc": { "start": { @@ -150,14 +146,14 @@ }, "end": { "line": 2, - "column": 22 + "column": 13 } } } ], "range": [ 0, - 41 + 26 ], "loc": { "start": { @@ -166,7 +162,7 @@ }, "end": { "line": 2, - "column": 22 + "column": 13 } } } @@ -175,10 +171,10 @@ "tokens": [ { "type": "Bare", - "value": "answer4", + "value": "bool1", "range": [ 0, - 7 + 5 ], "loc": { "start": { @@ -187,7 +183,7 @@ }, "end": { "line": 1, - "column": 7 + "column": 5 } } }, @@ -195,45 +191,45 @@ "type": "Punctuator", "value": "=", "range": [ - 8, - 9 + 6, + 7 ], "loc": { "start": { "line": 1, - "column": 8 + "column": 6 }, "end": { "line": 1, - "column": 9 + "column": 7 } } }, { - "type": "BasicString", - "value": "\"\\u03B4\"", - "string": "δ", + "type": "Boolean", + "value": "true", + "boolean": true, "range": [ - 10, - 18 + 8, + 12 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 8 }, "end": { "line": 1, - "column": 18 + "column": 12 } } }, { "type": "Bare", - "value": "answer8", + "value": "bool2", "range": [ - 19, - 26 + 13, + 18 ], "loc": { "start": { @@ -242,7 +238,7 @@ }, "end": { "line": 2, - "column": 7 + "column": 5 } } }, @@ -250,36 +246,36 @@ "type": "Punctuator", "value": "=", "range": [ - 27, - 28 + 19, + 20 ], "loc": { "start": { "line": 2, - "column": 8 + "column": 6 }, "end": { "line": 2, - "column": 9 + "column": 7 } } }, { - "type": "BasicString", - "value": "\"\\U000003B4\"", - "string": "δ", + "type": "Boolean", + "value": "false", + "boolean": false, "range": [ - 29, - 41 + 21, + 26 ], "loc": { "start": { "line": 2, - "column": 10 + "column": 8 }, "end": { "line": 2, - "column": 22 + "column": 13 } } } @@ -287,7 +283,7 @@ "comments": [], "range": [ 0, - 42 + 27 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/boolean-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/boolean-0-value.json new file mode 100644 index 0000000..22551ef --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/boolean-0-value.json @@ -0,0 +1,4 @@ +{ + "bool1": true, + "bool2": false +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/comment-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/comment-0-output.json new file mode 100644 index 0000000..e535b35 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/comment-0-output.json @@ -0,0 +1,339 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key", + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 36, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 30, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "another", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "# This is not a comment", + "style": "basic", + "multiline": false, + "range": [ + 96, + 121 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "range": [ + 86, + 121 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "range": [ + 30, + 121 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "key", + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 36, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "another", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"# This is not a comment\"", + "string": "# This is not a comment", + "range": [ + 96, + 121 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " This is a full-line comment", + "range": [ + 0, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": "Block", + "value": " This is a comment at the end of a line", + "range": [ + 45, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + ], + "range": [ + 0, + 122 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/comment-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/comment-0-value.json new file mode 100644 index 0000000..f48aec6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/comment-0-value.json @@ -0,0 +1,4 @@ +{ + "key": "value", + "another": "# This is not a comment" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-0-output.json new file mode 100644 index 0000000..7739335 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-0-output.json @@ -0,0 +1,1000 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt1", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 1, + "number": "+1.0", + "range": [ + 20, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 13, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt2", + "range": [ + 25, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 25, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 3.1415, + "number": "3.1415", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 25, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt3", + "range": [ + 39, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 39, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": -0.01, + "number": "-0.01", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt4", + "range": [ + 64, + 68 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 64, + 68 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 5e+22, + "number": "5e+22", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 64, + 76 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt5", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 1000000, + "number": "1e06", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "range": [ + 77, + 88 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt6", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": -0.02, + "number": "-2E-2", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "range": [ + 89, + 101 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "flt7", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": 6.626e-34, + "number": "6.626e-34", + "range": [ + 117, + 126 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "range": [ + 110, + 126 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 16 + } + } + } + ], + "range": [ + 13, + 126 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 12, + "column": 16 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "flt1", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "+1.0", + "number": 1, + "range": [ + 20, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "flt2", + "range": [ + 25, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "3.1415", + "number": 3.1415, + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "flt3", + "range": [ + 39, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "-0.01", + "number": -0.01, + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "flt4", + "range": [ + 64, + 68 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "5e+22", + "number": 5e+22, + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "flt5", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "1e06", + "number": 1000000, + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "flt6", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "-2E-2", + "number": -0.02, + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "flt7", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + { + "type": "Float", + "value": "6.626e-34", + "number": 6.626e-34, + "range": [ + 117, + 126 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 16 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " fractional", + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Block", + "value": " exponent", + "range": [ + 53, + 63 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Block", + "value": " both", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 6 + } + } + } + ], + "range": [ + 0, + 127 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-0-value.json new file mode 100644 index 0000000..2006a45 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-0-value.json @@ -0,0 +1,9 @@ +{ + "flt1": 1, + "flt2": 3.1415, + "flt3": -0.01, + "flt4": 5e+22, + "flt5": 1000000, + "flt6": -0.02, + "flt7": 6.626e-34 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-underscore-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-1-output.json similarity index 86% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-underscore-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-1-output.json index 41461c1..a0175a3 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/integer-underscore-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-1-output.json @@ -11,7 +11,7 @@ "keys": [ { "type": "TOMLBare", - "name": "kilo", + "name": "flt8", "range": [ 0, 4 @@ -45,12 +45,12 @@ }, "value": { "type": "TOMLValue", - "kind": "integer", - "value": 1000, - "number": "1000", + "kind": "float", + "value": 224617.445991228, + "number": "224617.445991228", "range": [ 7, - 12 + 26 ], "loc": { "start": { @@ -59,13 +59,13 @@ }, "end": { "line": 1, - "column": 12 + "column": 26 } } }, "range": [ 0, - 12 + 26 ], "loc": { "start": { @@ -74,14 +74,14 @@ }, "end": { "line": 1, - "column": 12 + "column": 26 } } } ], "range": [ 0, - 12 + 26 ], "loc": { "start": { @@ -90,7 +90,7 @@ }, "end": { "line": 1, - "column": 12 + "column": 26 } } } @@ -99,7 +99,7 @@ "tokens": [ { "type": "Bare", - "value": "kilo", + "value": "flt8", "range": [ 0, 4 @@ -134,12 +134,12 @@ } }, { - "type": "Integer", - "value": "1_000", - "number": 1000, + "type": "Float", + "value": "224_617.445_991_228", + "number": 224617.445991228, "range": [ 7, - 12 + 26 ], "loc": { "start": { @@ -148,7 +148,7 @@ }, "end": { "line": 1, - "column": 12 + "column": 26 } } } @@ -156,7 +156,7 @@ "comments": [], "range": [ 0, - 13 + 27 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-1-value.json new file mode 100644 index 0000000..0b8b197 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-1-value.json @@ -0,0 +1,3 @@ +{ + "flt8": 224617.445991228 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-2-output.json new file mode 100644 index 0000000..c8fab61 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-2-output.json @@ -0,0 +1,961 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sf1", + "range": [ + 11, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 11, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# Infinity #", + "number": "inf", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "range": [ + 11, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sf2", + "range": [ + 42, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + } + ], + "range": [ + 42, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# Infinity #", + "number": "+inf", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sf3", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# -Infinity #", + "number": "-inf", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "range": [ + 73, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sf4", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "nan", + "range": [ + 126, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "range": [ + 120, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sf5", + "range": [ + 186, + 189 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 186, + 189 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "+nan", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "range": [ + 186, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "sf6", + "range": [ + 213, + 216 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + ], + "range": [ + 213, + 216 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "float", + "value": "# NaN #", + "number": "-nan", + "range": [ + 219, + 223 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "range": [ + 213, + 223 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + } + } + ], + "range": [ + 11, + 223 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "sf1", + "range": [ + 11, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "inf", + "number": "# Infinity #", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "sf2", + "range": [ + 42, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "+inf", + "number": "# Infinity #", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "sf3", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "-inf", + "number": "# -Infinity #", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "sf4", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "nan", + "number": "# NaN #", + "range": [ + 126, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "sf5", + "range": [ + 186, + 189 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "+nan", + "number": "# NaN #", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "sf6", + "range": [ + 213, + 216 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Float", + "value": "-nan", + "number": "# NaN #", + "range": [ + 219, + 223 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 10 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " infinity", + "range": [ + 0, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Block", + "value": " positive infinity", + "range": [ + 22, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Block", + "value": " positive infinity", + "range": [ + 53, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Block", + "value": " negative infinity", + "range": [ + 84, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + { + "type": "Block", + "value": " not a number", + "range": [ + 105, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Block", + "value": " actual sNaN/qNaN encoding is implementation-specific", + "range": [ + 131, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 65 + } + } + }, + { + "type": "Block", + "value": " same as `nan`", + "range": [ + 197, + 212 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 26 + } + } + }, + { + "type": "Block", + "value": " valid, actual encoding is implementation-specific", + "range": [ + 224, + 275 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 62 + } + } + } + ], + "range": [ + 0, + 276 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-2-value.json new file mode 100644 index 0000000..c54bc1c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/float-2-value.json @@ -0,0 +1,8 @@ +{ + "sf1": "# Infinity #", + "sf2": "# Infinity #", + "sf3": "# -Infinity #", + "sf4": "# NaN #", + "sf5": "# NaN #", + "sf6": "# NaN #" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-0-output.json new file mode 100644 index 0000000..2250fd3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-0-output.json @@ -0,0 +1,1215 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "first", + "range": [ + 9, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + "range": [ + 9, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Tom", + "style": "basic", + "multiline": false, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "range": [ + 9, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "last", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 28 + } + } + } + ], + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Preston-Werner", + "style": "basic", + "multiline": false, + "range": [ + 31, + 47 + ], + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 47 + } + } + }, + "range": [ + 24, + 47 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 47 + } + } + } + ], + "range": [ + 7, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 49 + } + } + }, + "range": [ + 0, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 49 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "point", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "y", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 67, + 72 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 58, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 50, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "animal", + "range": [ + 75, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "range": [ + 75, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "type", + "range": [ + 86, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "TOMLBare", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + ], + "range": [ + 86, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "pug", + "style": "basic", + "multiline": false, + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "range": [ + 86, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 28 + } + } + } + ], + "range": [ + 84, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "range": [ + 75, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + ], + "range": [ + 0, + 105 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "name", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "first", + "range": [ + 9, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"Tom\"", + "string": "Tom", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "last", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "BasicString", + "value": "\"Preston-Werner\"", + "string": "Preston-Werner", + "range": [ + 31, + 47 + ], + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 47 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 48 + }, + "end": { + "line": 1, + "column": 49 + } + } + }, + { + "type": "Bare", + "value": "point", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Bare", + "value": "animal", + "range": [ + 75, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 86, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "BasicString", + "value": "\"pug\"", + "string": "pug", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + ], + "comments": [], + "range": [ + 0, + 106 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-0-value.json new file mode 100644 index 0000000..e3ed5fe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-0-value.json @@ -0,0 +1,15 @@ +{ + "name": { + "first": "Tom", + "last": "Preston-Werner" + }, + "point": { + "x": 1, + "y": 2 + }, + "animal": { + "type": { + "name": "pug" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-1-output.json new file mode 100644 index 0000000..aecb825 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-1-output.json @@ -0,0 +1,1086 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 1, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 1, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "resolvedKey": [ + "name" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "first", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Tom", + "style": "basic", + "multiline": false, + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 7, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "last", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Preston-Werner", + "style": "basic", + "multiline": false, + "range": [ + 28, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "range": [ + 21, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 23 + } + } + } + ], + "range": [ + 0, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "point", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + ], + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "resolvedKey": [ + "point" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + ], + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + } + ], + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "range": [ + 46, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "animal", + "range": [ + 68, + 74 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "range": [ + 68, + 74 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "resolvedKey": [ + "animal" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "type", + "range": [ + 76, + 80 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "name", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 76, + 85 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "pug", + "style": "basic", + "multiline": false, + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "range": [ + 76, + 93 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "range": [ + 67, + 93 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "range": [ + 0, + 93 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 1, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "first", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"Tom\"", + "string": "Tom", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "last", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Preston-Werner\"", + "string": "Preston-Werner", + "range": [ + 28, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "point", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "animal", + "range": [ + 68, + 74 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 76, + 80 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\"pug\"", + "string": "pug", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "comments": [], + "range": [ + 0, + 94 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-1-value.json new file mode 100644 index 0000000..e3ed5fe --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-1-value.json @@ -0,0 +1,15 @@ +{ + "name": { + "first": "Tom", + "last": "Preston-Werner" + }, + "point": { + "x": 1, + "y": 2 + }, + "animal": { + "type": { + "name": "pug" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-2-output.json new file mode 100644 index 0000000..b761c5c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-2-output.json @@ -0,0 +1,450 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "product", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "resolvedKey": [ + "product" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "type", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLInlineTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Nail", + "style": "basic", + "multiline": false, + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 17, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 10, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "range": [ + 0, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "range": [ + 0, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "product", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "BasicString", + "value": "\"Nail\"", + "string": "Nail", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " type.edible = false # INVALID", + "range": [ + 35, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 0, + 68 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-2-value.json new file mode 100644 index 0000000..3fdb079 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-2-value.json @@ -0,0 +1,7 @@ +{ + "product": { + "type": { + "name": "Nail" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-3-output.json new file mode 100644 index 0000000..47ab052 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-3-output.json @@ -0,0 +1,359 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "product", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "resolvedKey": [ + "product" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "type", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "name", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "range": [ + 10, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Nail", + "style": "basic", + "multiline": false, + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 10, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 0, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 0, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "product", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\"Nail\"", + "string": "Nail", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " type = { edible = false } # INVALID", + "range": [ + 29, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 0, + 68 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-3-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-3-value.json new file mode 100644 index 0000000..3fdb079 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/inline-table-3-value.json @@ -0,0 +1,7 @@ +{ + "product": { + "type": { + "name": "Nail" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-0-output.json new file mode 100644 index 0000000..1e7042c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-0-output.json @@ -0,0 +1,558 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 99, + "number": "+99", + "range": [ + 7, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "range": [ + 0, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int2", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 42, + "number": "42", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "range": [ + 11, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int3", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 0, + "number": "0", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "range": [ + 21, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int4", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": -17, + "number": "-17", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "range": [ + 30, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "range": [ + 0, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "int1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "+99", + "number": 99, + "range": [ + 7, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "int2", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "42", + "number": 42, + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "int3", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0", + "number": 0, + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "int4", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "-17", + "number": -17, + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "comments": [], + "range": [ + 0, + 41 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-0-value.json new file mode 100644 index 0000000..a291189 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-0-value.json @@ -0,0 +1,6 @@ +{ + "int1": 99, + "int2": 42, + "int3": 0, + "int4": -17 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-1-output.json new file mode 100644 index 0000000..ae2f968 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-1-output.json @@ -0,0 +1,595 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int5", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1000, + "number": "1000", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "range": [ + 0, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int6", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 5349221, + "number": "5349221", + "range": [ + 20, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 13, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int7", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 5349221, + "number": "5349221", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "range": [ + 30, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "int8", + "range": [ + 80, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 80, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 12345, + "number": "12345", + "range": [ + 87, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 80, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "range": [ + 0, + 96 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "int5", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "1_000", + "number": 1000, + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "int6", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "5_349_221", + "number": 5349221, + "range": [ + 20, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "int7", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "53_49_221", + "number": 5349221, + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "Bare", + "value": "int8", + "range": [ + 80, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "1_2_3_4_5", + "number": 12345, + "range": [ + 87, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Indian number system grouping", + "range": [ + 48, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 49 + } + } + }, + { + "type": "Block", + "value": " VALID but discouraged", + "range": [ + 98, + 121 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 0, + 122 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-1-value.json new file mode 100644 index 0000000..e56eada --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-1-value.json @@ -0,0 +1,6 @@ +{ + "int5": 1000, + "int6": 5349221, + "int7": 5349221, + "int8": 12345 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-2-output.json new file mode 100644 index 0000000..1ce988d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-2-output.json @@ -0,0 +1,889 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex1", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3735928559, + "number": "0xDEADBEEF", + "range": [ + 38, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 31, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex2", + "range": [ + 49, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 49, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3735928559, + "number": "0xdeadbeef", + "range": [ + 56, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 49, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "hex3", + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3735928559, + "number": "0xdeadbeef", + "range": [ + 74, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [ + 67, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "oct1", + "range": [ + 112, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 112, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 342391, + "number": "0o01234567", + "range": [ + 119, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "range": [ + 112, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "oct2", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 493, + "number": "0o755", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "range": [ + 130, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bin1", + "range": [ + 205, + 209 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "range": [ + 205, + 209 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 214, + "number": "0b11010110", + "range": [ + 212, + 222 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "range": [ + 205, + 222 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + ], + "range": [ + 31, + 222 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "hex1", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0xDEADBEEF", + "number": 3735928559, + "range": [ + 38, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "hex2", + "range": [ + 49, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0xdeadbeef", + "number": 3735928559, + "range": [ + 56, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "hex3", + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0xdead_beef", + "number": 3735928559, + "range": [ + 74, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "oct1", + "range": [ + 112, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0o01234567", + "number": 342391, + "range": [ + 119, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "oct2", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0o755", + "number": 493, + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "bin1", + "range": [ + 205, + 209 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "0b11010110", + "number": 214, + "range": [ + 212, + 222 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " hexadecimal with prefix `0x`", + "range": [ + 0, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "Block", + "value": " octal with prefix `0o`", + "range": [ + 87, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "Block", + "value": " useful for Unix file permissions", + "range": [ + 143, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 47 + } + } + }, + { + "type": "Block", + "value": " binary with prefix `0b`", + "range": [ + 179, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 25 + } + } + } + ], + "range": [ + 0, + 223 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-2-value.json new file mode 100644 index 0000000..0939228 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/integer-2-value.json @@ -0,0 +1,8 @@ +{ + "hex1": 3735928559, + "hex2": 3735928559, + "hex3": 3735928559, + "oct1": 342391, + "oct2": 493, + "bin1": 214 +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/key-value-pair-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/key-value-pair-0-output.json new file mode 100644 index 0000000..e8315ea --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/key-value-pair-0-output.json @@ -0,0 +1,172 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 6, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "key", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 6, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "comments": [], + "range": [ + 0, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/key-value-pair-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/key-value-pair-0-value.json new file mode 100644 index 0000000..d5df76e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/key-value-pair-0-value.json @@ -0,0 +1,3 @@ +{ + "key": "value" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-0-output.json new file mode 100644 index 0000000..03f24a9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-0-output.json @@ -0,0 +1,562 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 6, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bare_key", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 14, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "bare-key", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 44, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 33, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "1234", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 52, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "range": [ + 0, + 66 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "key", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 6, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "bare_key", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "bare-key", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 44, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "1234", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "comments": [], + "range": [ + 0, + 67 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-0-value.json new file mode 100644 index 0000000..26f2276 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-0-value.json @@ -0,0 +1,6 @@ +{ + "1234": "value", + "key": "value", + "bare_key": "value", + "bare-key": "value" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-1-output.json new file mode 100644 index 0000000..536d475 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-1-output.json @@ -0,0 +1,712 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "127.0.0.1", + "style": "basic", + "multiline": false, + "range": [ + 0, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + } + } + ], + "range": [ + 0, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "range": [ + 0, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "character encoding", + "style": "basic", + "multiline": false, + "range": [ + 22, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "range": [ + 22, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 45, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 22, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "ʎǝʞ", + "style": "basic", + "multiline": false, + "range": [ + 53, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + } + ], + "range": [ + 53, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "range": [ + 53, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "key2", + "style": "literal", + "multiline": false, + "range": [ + 69, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + ], + "range": [ + 69, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 69, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "quoted \"value\"", + "style": "literal", + "multiline": false, + "range": [ + 86, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "range": [ + 86, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "value", + "style": "basic", + "multiline": false, + "range": [ + 105, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 86, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 0, + 112 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "BasicString", + "value": "\"127.0.0.1\"", + "string": "127.0.0.1", + "range": [ + 0, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "BasicString", + "value": "\"character encoding\"", + "string": "character encoding", + "range": [ + 22, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 45, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "BasicString", + "value": "\"ʎǝʞ\"", + "string": "ʎǝʞ", + "range": [ + 53, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "LiteralString", + "value": "'key2'", + "string": "key2", + "range": [ + 69, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "LiteralString", + "value": "'quoted \"value\"'", + "string": "quoted \"value\"", + "range": [ + 86, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "BasicString", + "value": "\"value\"", + "string": "value", + "range": [ + 105, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "comments": [], + "range": [ + 0, + 113 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-1-value.json new file mode 100644 index 0000000..d74efa0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-1-value.json @@ -0,0 +1,7 @@ +{ + "127.0.0.1": "value", + "character encoding": "value", + "ʎǝʞ": "value", + "key2": "value", + "quoted \"value\"": "value" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-3-output.json new file mode 100644 index 0000000..540c786 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-3-output.json @@ -0,0 +1,726 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Orange", + "style": "basic", + "multiline": false, + "range": [ + 7, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "range": [ + 0, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "physical", + "range": [ + 16, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "range": [ + 16, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "orange", + "style": "basic", + "multiline": false, + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 16, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "physical", + "range": [ + 42, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "shape", + "range": [ + 51, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "range": [ + 42, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "round", + "style": "basic", + "multiline": false, + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 42, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "site", + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "google.com", + "style": "basic", + "multiline": false, + "range": [ + 72, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "range": [ + 67, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 67, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "range": [ + 0, + 91 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "name", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Orange\"", + "string": "Orange", + "range": [ + 7, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "physical", + "range": [ + 16, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"orange\"", + "string": "orange", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "physical", + "range": [ + 42, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "shape", + "range": [ + 51, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"round\"", + "string": "round", + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "Bare", + "value": "site", + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"google.com\"", + "string": "google.com", + "range": [ + 72, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "comments": [], + "range": [ + 0, + 92 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-3-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-3-value.json new file mode 100644 index 0000000..3990a16 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-3-value.json @@ -0,0 +1,10 @@ +{ + "name": "Orange", + "physical": { + "color": "orange", + "shape": "round" + }, + "site": { + "google.com": true + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-4-output.json new file mode 100644 index 0000000..e0f6c7f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-4-output.json @@ -0,0 +1,649 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "name", + "range": [ + 6, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 10 + } + } + } + ], + "range": [ + 0, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "banana", + "style": "basic", + "multiline": false, + "range": [ + 13, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "range": [ + 0, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "yellow", + "style": "basic", + "multiline": false, + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 50, + 73 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "flavor", + "range": [ + 107, + 113 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "range": [ + 99, + 113 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "banana", + "style": "basic", + "multiline": false, + "range": [ + 116, + 124 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 99, + 124 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "range": [ + 0, + 124 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "fruit", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 6, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"banana\"", + "string": "banana", + "range": [ + 13, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "BasicString", + "value": "\"yellow\"", + "string": "yellow", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "flavor", + "range": [ + 107, + 113 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"banana\"", + "string": "banana", + "range": [ + 116, + 124 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " this is best practice", + "range": [ + 26, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 49 + } + } + }, + { + "type": "Block", + "value": " same as fruit.color", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + { + "type": "Block", + "value": " same as fruit.flavor", + "range": [ + 127, + 149 + ], + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 50 + } + } + } + ], + "range": [ + 0, + 150 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-4-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-4-value.json new file mode 100644 index 0000000..a439302 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-4-value.json @@ -0,0 +1,7 @@ +{ + "fruit": { + "name": "banana", + "color": "yellow", + "flavor": "banana" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-5-output.json new file mode 100644 index 0000000..78eb3cf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-5-output.json @@ -0,0 +1,1165 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "range": [ + 25, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "fruit", + "style": "basic", + "multiline": false, + "range": [ + 38, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 25, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "type", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 46, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "fruit", + "style": "basic", + "multiline": false, + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 46, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "skin", + "range": [ + 75, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + ], + "range": [ + 69, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "thin", + "style": "basic", + "multiline": false, + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "range": [ + 69, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "skin", + "range": [ + 96, + 100 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "thick", + "style": "basic", + "multiline": false, + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 89, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 112, + 117 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + } + ], + "range": [ + 112, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + "range": [ + 112, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 132, + 138 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 139, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + ], + "range": [ + 132, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "orange", + "style": "basic", + "multiline": false, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 132, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + ], + "range": [ + 25, + 155 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "apple", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"fruit\"", + "string": "fruit", + "range": [ + 38, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"fruit\"", + "string": "fruit", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "skin", + "range": [ + 75, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"thin\"", + "string": "thin", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "skin", + "range": [ + 96, + 100 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"thick\"", + "string": "thick", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 112, + 117 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 132, + 138 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 139, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + { + "type": "BasicString", + "value": "\"orange\"", + "string": "orange", + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " VALID BUT DISCOURAGED", + "range": [ + 0, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "range": [ + 0, + 156 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-5-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-5-value.json new file mode 100644 index 0000000..e4e3d01 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-5-value.json @@ -0,0 +1,12 @@ +{ + "apple": { + "type": "fruit", + "skin": "thin", + "color": "red" + }, + "orange": { + "type": "fruit", + "skin": "thick", + "color": "orange" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-6-output.json new file mode 100644 index 0000000..bf4147b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-6-output.json @@ -0,0 +1,1165 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "type", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "fruit", + "style": "basic", + "multiline": false, + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 15, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "skin", + "range": [ + 42, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "range": [ + 36, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "thin", + "style": "basic", + "multiline": false, + "range": [ + 49, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 36, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 62, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 56, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 77, + 83 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "type", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "range": [ + 77, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "fruit", + "style": "basic", + "multiline": false, + "range": [ + 91, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 99, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "skin", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + ], + "range": [ + 99, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "thick", + "style": "basic", + "multiline": false, + "range": [ + 113, + 120 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + "range": [ + 99, + 120 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 121, + 127 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + ], + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "orange", + "style": "basic", + "multiline": false, + "range": [ + 136, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "range": [ + 121, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 15, + 144 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "apple", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"fruit\"", + "string": "fruit", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "skin", + "range": [ + 42, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "BasicString", + "value": "\"thin\"", + "string": "thin", + "range": [ + 49, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 62, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 77, + 83 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"fruit\"", + "string": "fruit", + "range": [ + 91, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 99, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "skin", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"thick\"", + "string": "thick", + "range": [ + 113, + 120 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 121, + 127 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "BasicString", + "value": "\"orange\"", + "string": "orange", + "range": [ + 136, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " RECOMMENDED", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 0, + 145 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-6-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-6-value.json new file mode 100644 index 0000000..e4e3d01 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-6-value.json @@ -0,0 +1,12 @@ +{ + "apple": { + "type": "fruit", + "skin": "thin", + "color": "red" + }, + "orange": { + "type": "fruit", + "skin": "thick", + "color": "orange" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-7-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-7-output.json new file mode 100644 index 0000000..7bbc054 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-7-output.json @@ -0,0 +1,226 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "3", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "TOMLBare", + "name": "14159", + "range": [ + 2, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "pi", + "style": "basic", + "multiline": false, + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "range": [ + 0, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + "range": [ + 0, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "3", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "14159", + "range": [ + 2, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"pi\"", + "string": "pi", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + "comments": [], + "range": [ + 0, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-7-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-7-value.json new file mode 100644 index 0000000..90bf2b9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/keys-7-value.json @@ -0,0 +1,5 @@ +{ + "3": { + "14159": "pi" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-0-output.json new file mode 100644 index 0000000..57de9d7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-0-output.json @@ -0,0 +1,170 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ld1", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "1979-05-27T00:00:00.000Z", + "datetime": "1979-05-27", + "range": [ + 6, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "range": [ + 0, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 0, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "ld1", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "LocalDate", + "value": "1979-05-27", + "range": [ + 6, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "comments": [], + "range": [ + 0, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-0-value.json new file mode 100644 index 0000000..bcfa19c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-0-value.json @@ -0,0 +1,3 @@ +{ + "ld1": "1979-05-27T00:00:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-time-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-time-0-output.json new file mode 100644 index 0000000..f49faab --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-time-0-output.json @@ -0,0 +1,298 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ldt1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date-time", + "value": "1979-05-26T22:32:00.000Z", + "datetime": "1979-05-27T07:32:00", + "range": [ + 7, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "range": [ + 0, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ldt2", + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date-time", + "value": "1979-05-26T15:32:00.999Z", + "datetime": "1979-05-27T00:32:00.999999", + "range": [ + 34, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "range": [ + 27, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "range": [ + 0, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "ldt1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "LocalDateTime", + "value": "1979-05-27T07:32:00", + "range": [ + 7, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Bare", + "value": "ldt2", + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "LocalDateTime", + "value": "1979-05-27T00:32:00.999999", + "range": [ + 34, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "comments": [], + "range": [ + 0, + 61 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-time-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-time-0-value.json new file mode 100644 index 0000000..3219076 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-date-time-0-value.json @@ -0,0 +1,4 @@ +{ + "ldt1": "1979-05-26T22:32:00.000Z", + "ldt2": "1979-05-26T15:32:00.999Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-time-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-time-0-output.json new file mode 100644 index 0000000..3c14ba8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-time-0-output.json @@ -0,0 +1,298 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lt1", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-time", + "value": "0000-01-01T07:32:00.000Z", + "datetime": "07:32:00", + "range": [ + 6, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "range": [ + 0, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lt2", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-time", + "value": "0000-01-01T00:32:00.999Z", + "datetime": "00:32:00.999999", + "range": [ + 21, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 15, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "range": [ + 0, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "lt1", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "LocalTime", + "value": "07:32:00", + "range": [ + 6, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "lt2", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "LocalTime", + "value": "00:32:00.999999", + "range": [ + 21, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "comments": [], + "range": [ + 0, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-time-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-time-0-value.json new file mode 100644 index 0000000..0ee3170 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/local-time-0-value.json @@ -0,0 +1,4 @@ +{ + "lt1": "0000-01-01T07:32:00.000Z", + "lt2": "0000-01-01T00:32:00.999Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-0-output.json similarity index 75% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-0-output.json index 98f119c..d326039 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/datetime-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-0-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "bestdayever", + "name": "odt1", "range": [ 0, - 11 + 4 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 11 + "column": 4 } } } ], "range": [ 0, - 11 + 4 ], "loc": { "start": { @@ -39,33 +39,33 @@ }, "end": { "line": 1, - "column": 11 + "column": 4 } } }, "value": { "type": "TOMLValue", "kind": "offset-date-time", - "value": "1987-07-05T17:45:00.000Z", - "datetime": "1987-07-05T17:45:00Z", + "value": "1979-05-27T07:32:00.000Z", + "datetime": "1979-05-27T07:32:00Z", "range": [ - 14, - 34 + 7, + 27 ], "loc": { "start": { "line": 1, - "column": 14 + "column": 7 }, "end": { "line": 1, - "column": 34 + "column": 27 } } }, "range": [ 0, - 34 + 27 ], "loc": { "start": { @@ -74,7 +74,7 @@ }, "end": { "line": 1, - "column": 34 + "column": 27 } } }, @@ -85,10 +85,10 @@ "keys": [ { "type": "TOMLBare", - "name": "numoffset", + "name": "odt2", "range": [ - 35, - 44 + 28, + 32 ], "loc": { "start": { @@ -97,14 +97,14 @@ }, "end": { "line": 2, - "column": 9 + "column": 4 } } } ], "range": [ - 35, - 44 + 28, + 32 ], "loc": { "start": { @@ -113,33 +113,33 @@ }, "end": { "line": 2, - "column": 9 + "column": 4 } } }, "value": { "type": "TOMLValue", "kind": "offset-date-time", - "value": "1977-06-28T12:32:00.000Z", - "datetime": "1977-06-28T07:32:00-05:00", + "value": "1979-05-27T07:32:00.000Z", + "datetime": "1979-05-27T00:32:00-07:00", "range": [ - 47, - 72 + 35, + 60 ], "loc": { "start": { "line": 2, - "column": 12 + "column": 7 }, "end": { "line": 2, - "column": 37 + "column": 32 } } }, "range": [ - 35, - 72 + 28, + 60 ], "loc": { "start": { @@ -148,7 +148,7 @@ }, "end": { "line": 2, - "column": 37 + "column": 32 } } }, @@ -159,10 +159,10 @@ "keys": [ { "type": "TOMLBare", - "name": "milliseconds", + "name": "odt3", "range": [ - 73, - 85 + 61, + 65 ], "loc": { "start": { @@ -171,14 +171,14 @@ }, "end": { "line": 3, - "column": 12 + "column": 4 } } } ], "range": [ - 73, - 85 + 61, + 65 ], "loc": { "start": { @@ -187,33 +187,33 @@ }, "end": { "line": 3, - "column": 12 + "column": 4 } } }, "value": { "type": "TOMLValue", "kind": "offset-date-time", - "value": "1977-12-21T03:32:00.555Z", - "datetime": "1977-12-21T10:32:00.555+07:00", + "value": "1979-05-27T07:32:00.999Z", + "datetime": "1979-05-27T00:32:00.999999-07:00", "range": [ - 88, - 117 + 68, + 100 ], "loc": { "start": { "line": 3, - "column": 15 + "column": 7 }, "end": { "line": 3, - "column": 44 + "column": 39 } } }, "range": [ - 73, - 117 + 61, + 100 ], "loc": { "start": { @@ -222,14 +222,14 @@ }, "end": { "line": 3, - "column": 44 + "column": 39 } } } ], "range": [ 0, - 117 + 100 ], "loc": { "start": { @@ -238,7 +238,7 @@ }, "end": { "line": 3, - "column": 44 + "column": 39 } } } @@ -247,10 +247,10 @@ "tokens": [ { "type": "Bare", - "value": "bestdayever", + "value": "odt1", "range": [ 0, - 11 + 4 ], "loc": { "start": { @@ -259,7 +259,7 @@ }, "end": { "line": 1, - "column": 11 + "column": 4 } } }, @@ -267,44 +267,44 @@ "type": "Punctuator", "value": "=", "range": [ - 12, - 13 + 5, + 6 ], "loc": { "start": { "line": 1, - "column": 12 + "column": 5 }, "end": { "line": 1, - "column": 13 + "column": 6 } } }, { "type": "OffsetDateTime", - "value": "1987-07-05T17:45:00Z", + "value": "1979-05-27T07:32:00Z", "range": [ - 14, - 34 + 7, + 27 ], "loc": { "start": { "line": 1, - "column": 14 + "column": 7 }, "end": { "line": 1, - "column": 34 + "column": 27 } } }, { "type": "Bare", - "value": "numoffset", + "value": "odt2", "range": [ - 35, - 44 + 28, + 32 ], "loc": { "start": { @@ -313,7 +313,7 @@ }, "end": { "line": 2, - "column": 9 + "column": 4 } } }, @@ -321,44 +321,44 @@ "type": "Punctuator", "value": "=", "range": [ - 45, - 46 + 33, + 34 ], "loc": { "start": { "line": 2, - "column": 10 + "column": 5 }, "end": { "line": 2, - "column": 11 + "column": 6 } } }, { "type": "OffsetDateTime", - "value": "1977-06-28T07:32:00-05:00", + "value": "1979-05-27T00:32:00-07:00", "range": [ - 47, - 72 + 35, + 60 ], "loc": { "start": { "line": 2, - "column": 12 + "column": 7 }, "end": { "line": 2, - "column": 37 + "column": 32 } } }, { "type": "Bare", - "value": "milliseconds", + "value": "odt3", "range": [ - 73, - 85 + 61, + 65 ], "loc": { "start": { @@ -367,7 +367,7 @@ }, "end": { "line": 3, - "column": 12 + "column": 4 } } }, @@ -375,35 +375,35 @@ "type": "Punctuator", "value": "=", "range": [ - 86, - 87 + 66, + 67 ], "loc": { "start": { "line": 3, - "column": 13 + "column": 5 }, "end": { "line": 3, - "column": 14 + "column": 6 } } }, { "type": "OffsetDateTime", - "value": "1977-12-21T10:32:00.555+07:00", + "value": "1979-05-27T00:32:00.999999-07:00", "range": [ - 88, - 117 + 68, + 100 ], "loc": { "start": { "line": 3, - "column": 15 + "column": 7 }, "end": { "line": 3, - "column": 44 + "column": 39 } } } @@ -411,7 +411,7 @@ "comments": [], "range": [ 0, - 118 + 101 ], "loc": { "start": { diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-0-value.json new file mode 100644 index 0000000..7cb00a8 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-0-value.json @@ -0,0 +1,5 @@ +{ + "odt1": "1979-05-27T07:32:00.000Z", + "odt2": "1979-05-27T07:32:00.000Z", + "odt3": "1979-05-27T07:32:00.999Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-1-output.json new file mode 100644 index 0000000..1f8a33c --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-1-output.json @@ -0,0 +1,170 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "odt4", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "offset-date-time", + "value": "1979-05-27T07:32:00.000Z", + "datetime": "1979-05-27 07:32:00Z", + "range": [ + 7, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "range": [ + 0, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + ], + "range": [ + 0, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "odt4", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "OffsetDateTime", + "value": "1979-05-27 07:32:00Z", + "range": [ + 7, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + ], + "comments": [], + "range": [ + 0, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-1-value.json new file mode 100644 index 0000000..506146d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/offset-date-time-1-value.json @@ -0,0 +1,3 @@ +{ + "odt4": "1979-05-27T07:32:00.000Z" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-0-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-0-output.json new file mode 100644 index 0000000..0d608bf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-0-output.json @@ -0,0 +1,172 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF.", + "style": "basic", + "multiline": false, + "range": [ + 6, + 74 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 74 + } + } + }, + "range": [ + 0, + 74 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 74 + } + } + } + ], + "range": [ + 0, + 74 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 74 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "str", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"I'm a string. \\\"You can quote me\\\". Name\\tJos\\u00E9\\nLocation\\tSF.\"", + "string": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF.", + "range": [ + 6, + 74 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 74 + } + } + } + ], + "comments": [], + "range": [ + 0, + 75 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-0-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-0-value.json new file mode 100644 index 0000000..5c1d2e4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-0-value.json @@ -0,0 +1,3 @@ +{ + "str": "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF." +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-1-output.json new file mode 100644 index 0000000..b724ef4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-1-output.json @@ -0,0 +1,172 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Roses are red\nViolets are blue", + "style": "basic", + "multiline": true, + "range": [ + 7, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 0, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "range": [ + 0, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "str1", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nRoses are red\nViolets are blue\"\"\"", + "string": "Roses are red\nViolets are blue", + "range": [ + 7, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "comments": [], + "range": [ + 0, + 45 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-1-value.json new file mode 100644 index 0000000..b50b47a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-1-value.json @@ -0,0 +1,3 @@ +{ + "str1": "Roses are red\nViolets are blue" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-2-output.json new file mode 100644 index 0000000..3451d49 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-2-output.json @@ -0,0 +1,339 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str2", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Roses are red\nViolets are blue", + "style": "basic", + "multiline": false, + "range": [ + 88, + 121 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 81, + 121 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str3", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + } + ], + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Roses are red\r\nViolets are blue", + "style": "basic", + "multiline": false, + "range": [ + 191, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 42 + } + } + }, + "range": [ + 184, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 42 + } + } + } + ], + "range": [ + 81, + 226 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 42 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "str2", + "range": [ + 81, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Roses are red\\nViolets are blue\"", + "string": "Roses are red\nViolets are blue", + "range": [ + 88, + 121 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + { + "type": "Bare", + "value": "str3", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Roses are red\\r\\nViolets are blue\"", + "string": "Roses are red\r\nViolets are blue", + "range": [ + 191, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 42 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " On a Unix system, the above multi-line string will most likely be the same as:", + "range": [ + 0, + 80 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 80 + } + } + }, + { + "type": "Block", + "value": " On a Windows system, it will most likely be equivalent to:", + "range": [ + 123, + 183 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 60 + } + } + } + ], + "range": [ + 0, + 227 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-2-value.json new file mode 100644 index 0000000..247c5eb --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-2-value.json @@ -0,0 +1,4 @@ +{ + "str2": "Roses are red\nViolets are blue", + "str3": "Roses are red\r\nViolets are blue" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-3-output.json new file mode 100644 index 0000000..5a692c1 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-3-output.json @@ -0,0 +1,451 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str1", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": false, + "range": [ + 61, + 107 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 53 + } + } + }, + "range": [ + 54, + 107 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 53 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str2", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": true, + "range": [ + 116, + 179 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "range": [ + 109, + 179 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str3", + "range": [ + 181, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "range": [ + 181, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": true, + "range": [ + 188, + 274 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "range": [ + 181, + 274 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "range": [ + 54, + 274 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "str1", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"The quick brown fox jumps over the lazy dog.\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 61, + 107 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 53 + } + } + }, + { + "type": "Bare", + "value": "str2", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nThe quick brown \\\n\n\n fox jumps over \\\n the lazy dog.\"\"\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 116, + 179 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "str3", + "range": [ + 181, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\\n The quick brown \\\n fox jumps over \\\n the lazy dog.\\\n \"\"\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 188, + 274 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " The following strings are byte-for-byte equivalent:", + "range": [ + 0, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 53 + } + } + } + ], + "range": [ + 0, + 275 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-3-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-3-value.json new file mode 100644 index 0000000..51130b6 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-3-value.json @@ -0,0 +1,5 @@ +{ + "str1": "The quick brown fox jumps over the lazy dog.", + "str2": "The quick brown fox jumps over the lazy dog.", + "str3": "The quick brown fox jumps over the lazy dog." +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-4-output.json new file mode 100644 index 0000000..4a19a10 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-4-output.json @@ -0,0 +1,599 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str4", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Here are two quotation marks: \"\". Simple enough.", + "style": "basic", + "multiline": true, + "range": [ + 7, + 61 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 61 + } + } + }, + "range": [ + 0, + 61 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 61 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str5", + "range": [ + 125, + 129 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 125, + 129 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Here are three quotation marks: \"\"\".", + "style": "basic", + "multiline": true, + "range": [ + 132, + 175 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + "range": [ + 125, + 175 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str6", + "range": [ + 176, + 180 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + } + ], + "range": [ + 176, + 180 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\".", + "style": "basic", + "multiline": true, + "range": [ + 183, + 244 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 68 + } + } + }, + "range": [ + 176, + 244 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 68 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "str7", + "range": [ + 299, + 303 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 299, + 303 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\"This,\" she said, \"is just a pointless statement.\"", + "style": "basic", + "multiline": true, + "range": [ + 306, + 362 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 63 + } + } + }, + "range": [ + 299, + 362 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 63 + } + } + } + ], + "range": [ + 0, + 362 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 63 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "str4", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"Here are two quotation marks: \"\". Simple enough.\"\"\"", + "string": "Here are two quotation marks: \"\". Simple enough.", + "range": [ + 7, + 61 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 61 + } + } + }, + { + "type": "Bare", + "value": "str5", + "range": [ + 125, + 129 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"Here are three quotation marks: \"\"\\\".\"\"\"", + "string": "Here are three quotation marks: \"\"\".", + "range": [ + 132, + 175 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 50 + } + } + }, + { + "type": "Bare", + "value": "str6", + "range": [ + 176, + 180 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 181, + 182 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"Here are fifteen quotation marks: \"\"\\\"\"\"\\\"\"\"\\\"\"\"\\\"\"\"\\\".\"\"\"", + "string": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\".", + "range": [ + 183, + 244 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 68 + } + } + }, + { + "type": "Bare", + "value": "str7", + "range": [ + 299, + 303 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\"This,\" she said, \"is just a pointless statement.\"\"\"\"", + "string": "\"This,\" she said, \"is just a pointless statement.\"", + "range": [ + 306, + 362 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 63 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " str5 = \"\"\"Here are three quotation marks: \"\"\".\"\"\" # INVALID", + "range": [ + 62, + 124 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 62 + } + } + }, + { + "type": "Block", + "value": " \"This,\" she said, \"is just a pointless statement.\"", + "range": [ + 246, + 298 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 52 + } + } + } + ], + "range": [ + 0, + 363 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-4-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-4-value.json new file mode 100644 index 0000000..18a5213 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-4-value.json @@ -0,0 +1,6 @@ +{ + "str4": "Here are two quotation marks: \"\". Simple enough.", + "str5": "Here are three quotation marks: \"\"\".", + "str6": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\".", + "str7": "\"This,\" she said, \"is just a pointless statement.\"" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-5-output.json new file mode 100644 index 0000000..9bab759 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-5-output.json @@ -0,0 +1,581 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "winpath", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "C:\\Users\\nodejs\\templates", + "style": "literal", + "multiline": false, + "range": [ + 43, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "range": [ + 32, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "winpath2", + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\\\\ServerX\\admin$\\system32\\", + "style": "literal", + "multiline": false, + "range": [ + 82, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + "range": [ + 71, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "quoted", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + ], + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Tom \"Dubs\" Preston-Werner", + "style": "literal", + "multiline": false, + "range": [ + 122, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 38 + } + } + }, + "range": [ + 111, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 38 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "regex", + "range": [ + 150, + 155 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 150, + 155 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "<\\i\\c*\\s*>", + "style": "literal", + "multiline": false, + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "range": [ + 150, + 173 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 32, + 173 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "winpath", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "LiteralString", + "value": "'C:\\Users\\nodejs\\templates'", + "string": "C:\\Users\\nodejs\\templates", + "range": [ + 43, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + { + "type": "Bare", + "value": "winpath2", + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "LiteralString", + "value": "'\\\\ServerX\\admin$\\system32\\'", + "string": "\\\\ServerX\\admin$\\system32\\", + "range": [ + 82, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + { + "type": "Bare", + "value": "quoted", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "LiteralString", + "value": "'Tom \"Dubs\" Preston-Werner'", + "string": "Tom \"Dubs\" Preston-Werner", + "range": [ + 122, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 38 + } + } + }, + { + "type": "Bare", + "value": "regex", + "range": [ + 150, + 155 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "LiteralString", + "value": "'<\\i\\c*\\s*>'", + "string": "<\\i\\c*\\s*>", + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " What you see is what you get.", + "range": [ + 0, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + ], + "range": [ + 0, + 174 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-5-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-5-value.json new file mode 100644 index 0000000..6188f0f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-5-value.json @@ -0,0 +1,6 @@ +{ + "winpath": "C:\\Users\\nodejs\\templates", + "winpath2": "\\\\ServerX\\admin$\\system32\\", + "quoted": "Tom \"Dubs\" Preston-Werner", + "regex": "<\\i\\c*\\s*>" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-6-output.json new file mode 100644 index 0000000..2ff6a8e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-6-output.json @@ -0,0 +1,302 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "regex2", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "I [dw]on't need \\d{2} apples", + "style": "literal", + "multiline": true, + "range": [ + 9, + 43 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 43 + } + } + }, + "range": [ + 0, + 43 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lines", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n", + "style": "literal", + "multiline": true, + "range": [ + 53, + 146 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "range": [ + 44, + 146 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "range": [ + 0, + 146 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "regex2", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''I [dw]on't need \\d{2} apples'''", + "string": "I [dw]on't need \\d{2} apples", + "range": [ + 9, + 43 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 43 + } + } + }, + { + "type": "Bare", + "value": "lines", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''\nThe first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n'''", + "string": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n", + "range": [ + 53, + 146 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "comments": [], + "range": [ + 0, + 147 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-6-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-6-value.json new file mode 100644 index 0000000..7c210ac --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-6-value.json @@ -0,0 +1,4 @@ +{ + "regex2": "I [dw]on't need \\d{2} apples", + "lines": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-multiline-string-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-7-output.json similarity index 64% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-multiline-string-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-7-output.json index fa8d7ba..8b96ceb 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-multiline-string-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-7-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "oneline", + "name": "quot15", "range": [ 0, - 7 + 6 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 7 + "column": 6 } } } ], "range": [ 0, - 7 + 6 ], "loc": { "start": { @@ -39,34 +39,34 @@ }, "end": { "line": 1, - "column": 7 + "column": 6 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a ' quote character.", + "value": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"", "style": "literal", "multiline": true, "range": [ - 10, - 52 + 9, + 64 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 9 }, "end": { "line": 1, - "column": 52 + "column": 64 } } }, "range": [ 0, - 52 + 64 ], "loc": { "start": { @@ -75,7 +75,7 @@ }, "end": { "line": 1, - "column": 52 + "column": 64 } } }, @@ -86,71 +86,71 @@ "keys": [ { "type": "TOMLBare", - "name": "firstnl", + "name": "apos15", "range": [ - 53, - 60 + 140, + 146 ], "loc": { "start": { - "line": 2, + "line": 4, "column": 0 }, "end": { - "line": 2, - "column": 7 + "line": 4, + "column": 6 } } } ], "range": [ - 53, - 60 + 140, + 146 ], "loc": { "start": { - "line": 2, + "line": 4, "column": 0 }, "end": { - "line": 2, - "column": 7 + "line": 4, + "column": 6 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a ' quote character.", - "style": "literal", - "multiline": true, + "value": "Here are fifteen apostrophes: '''''''''''''''", + "style": "basic", + "multiline": false, "range": [ - 63, - 106 + 149, + 196 ], "loc": { "start": { - "line": 2, - "column": 10 + "line": 4, + "column": 9 }, "end": { - "line": 3, - "column": 39 + "line": 4, + "column": 56 } } }, "range": [ - 53, - 106 + 140, + 196 ], "loc": { "start": { - "line": 2, + "line": 4, "column": 0 }, "end": { - "line": 3, - "column": 39 + "line": 4, + "column": 56 } } }, @@ -161,78 +161,78 @@ "keys": [ { "type": "TOMLBare", - "name": "multiline", + "name": "str", "range": [ - 107, - 116 + 240, + 243 ], "loc": { "start": { - "line": 4, + "line": 7, "column": 0 }, "end": { - "line": 4, - "column": 9 + "line": 7, + "column": 3 } } } ], "range": [ - 107, - 116 + 240, + 243 ], "loc": { "start": { - "line": 4, + "line": 7, "column": 0 }, "end": { - "line": 4, - "column": 9 + "line": 7, + "column": 3 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string\nhas ' a quote character\nand more than\none newline\nin it.", + "value": "'That,' she said, 'is still pointless.'", "style": "literal", "multiline": true, "range": [ - 119, - 194 + 246, + 291 ], "loc": { "start": { - "line": 4, - "column": 12 + "line": 7, + "column": 6 }, "end": { - "line": 9, - "column": 9 + "line": 7, + "column": 51 } } }, "range": [ - 107, - 194 + 240, + 291 ], "loc": { "start": { - "line": 4, + "line": 7, "column": 0 }, "end": { - "line": 9, - "column": 9 + "line": 7, + "column": 51 } } } ], "range": [ 0, - 194 + 291 ], "loc": { "start": { @@ -240,8 +240,8 @@ "column": 0 }, "end": { - "line": 9, - "column": 9 + "line": 7, + "column": 51 } } } @@ -250,10 +250,10 @@ "tokens": [ { "type": "Bare", - "value": "oneline", + "value": "quot15", "range": [ 0, - 7 + 6 ], "loc": { "start": { @@ -262,7 +262,7 @@ }, "end": { "line": 1, - "column": 7 + "column": 6 } } }, @@ -270,54 +270,54 @@ "type": "Punctuator", "value": "=", "range": [ - 8, - 9 + 7, + 8 ], "loc": { "start": { "line": 1, - "column": 8 + "column": 7 }, "end": { "line": 1, - "column": 9 + "column": 8 } } }, { "type": "MultiLineLiteralString", - "value": "'''This string has a ' quote character.'''", - "string": "This string has a ' quote character.", + "value": "'''Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"'''", + "string": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"", "range": [ - 10, - 52 + 9, + 64 ], "loc": { "start": { "line": 1, - "column": 10 + "column": 9 }, "end": { "line": 1, - "column": 52 + "column": 64 } } }, { "type": "Bare", - "value": "firstnl", + "value": "apos15", "range": [ - 53, - 60 + 140, + 146 ], "loc": { "start": { - "line": 2, + "line": 4, "column": 0 }, "end": { - "line": 2, - "column": 7 + "line": 4, + "column": 6 } } }, @@ -325,54 +325,54 @@ "type": "Punctuator", "value": "=", "range": [ - 61, - 62 + 147, + 148 ], "loc": { "start": { - "line": 2, - "column": 8 + "line": 4, + "column": 7 }, "end": { - "line": 2, - "column": 9 + "line": 4, + "column": 8 } } }, { - "type": "MultiLineLiteralString", - "value": "'''\nThis string has a ' quote character.'''", - "string": "This string has a ' quote character.", + "type": "BasicString", + "value": "\"Here are fifteen apostrophes: '''''''''''''''\"", + "string": "Here are fifteen apostrophes: '''''''''''''''", "range": [ - 63, - 106 + 149, + 196 ], "loc": { "start": { - "line": 2, - "column": 10 + "line": 4, + "column": 9 }, "end": { - "line": 3, - "column": 39 + "line": 4, + "column": 56 } } }, { "type": "Bare", - "value": "multiline", + "value": "str", "range": [ - 107, - 116 + 240, + 243 ], "loc": { "start": { - "line": 4, + "line": 7, "column": 0 }, "end": { - "line": 4, - "column": 9 + "line": 7, + "column": 3 } } }, @@ -380,44 +380,81 @@ "type": "Punctuator", "value": "=", "range": [ - 117, - 118 + 244, + 245 ], "loc": { "start": { - "line": 4, - "column": 10 + "line": 7, + "column": 4 }, "end": { - "line": 4, - "column": 11 + "line": 7, + "column": 5 } } }, { "type": "MultiLineLiteralString", - "value": "'''\nThis string\nhas ' a quote character\nand more than\none newline\nin it.'''", - "string": "This string\nhas ' a quote character\nand more than\none newline\nin it.", + "value": "''''That,' she said, 'is still pointless.''''", + "string": "'That,' she said, 'is still pointless.'", "range": [ - 119, - 194 + 246, + 291 ], "loc": { "start": { - "line": 4, - "column": 12 + "line": 7, + "column": 6 }, "end": { - "line": 9, - "column": 9 + "line": 7, + "column": 51 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " apos15 = '''Here are fifteen apostrophes: '''''''''''''''''' # INVALID", + "range": [ + 66, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + { + "type": "Block", + "value": " 'That,' she said, 'is still pointless.'", + "range": [ + 198, + 239 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 41 } } } ], - "comments": [], "range": [ 0, - 195 + 292 ], "loc": { "start": { @@ -425,7 +462,7 @@ "column": 0 }, "end": { - "line": 10, + "line": 8, "column": 0 } } diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-7-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-7-value.json new file mode 100644 index 0000000..f88b9c4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/string-7-value.json @@ -0,0 +1,5 @@ +{ + "quot15": "Here are fifteen quotation marks: \"\"\"\"\"\"\"\"\"\"\"\"\"\"\"", + "apos15": "Here are fifteen apostrophes: '''''''''''''''", + "str": "'That,' she said, 'is still pointless.'" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-no-eol-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-0-output.json similarity index 98% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-no-eol-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-0-output.json index 6ed0511..53f0ecf 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-no-eol-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-0-output.json @@ -140,7 +140,7 @@ "comments": [], "range": [ 0, - 7 + 8 ], "loc": { "start": { @@ -148,8 +148,8 @@ "column": 0 }, "end": { - "line": 1, - "column": 7 + "line": 2, + "column": 0 } } } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-no-eol-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-0-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-no-eol-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-0-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-1-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-1-output.json new file mode 100644 index 0000000..f40cf7b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-1-output.json @@ -0,0 +1,788 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "table-1", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + ], + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "resolvedKey": [ + "table-1" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key1", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "some string", + "style": "basic", + "multiline": false, + "range": [ + 17, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 10, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key2", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + ], + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 123, + "number": "123", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 31, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "range": [ + 0, + 41 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "table-2", + "range": [ + 44, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "range": [ + 44, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "resolvedKey": [ + "table-2" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key1", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + } + ], + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "another string", + "style": "basic", + "multiline": false, + "range": [ + 60, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "range": [ + 53, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key2", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 456, + "number": "456", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "range": [ + 77, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "range": [ + 43, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "range": [ + 0, + 87 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "table-1", + "range": [ + 1, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "key1", + "range": [ + 10, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"some string\"", + "string": "some string", + "range": [ + 17, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "key2", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "123", + "number": 123, + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "table-2", + "range": [ + 44, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "key1", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"another string\"", + "string": "another string", + "range": [ + 60, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "key2", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "456", + "number": 456, + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "comments": [], + "range": [ + 0, + 88 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-1-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-1-value.json new file mode 100644 index 0000000..be3a8a0 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-1-value.json @@ -0,0 +1,10 @@ +{ + "table-1": { + "key1": "some string", + "key2": 123 + }, + "table-2": { + "key1": "another string", + "key2": 456 + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-2-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-2-output.json new file mode 100644 index 0000000..458abbf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-2-output.json @@ -0,0 +1,399 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "dog", + "range": [ + 1, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "tater.man", + "style": "basic", + "multiline": false, + "range": [ + 5, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 1, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "resolvedKey": [ + "dog", + "tater.man" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "type", + "range": [ + 18, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "name", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "pug", + "style": "basic", + "multiline": false, + "range": [ + 30, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 18, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "range": [ + 0, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "range": [ + 0, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "dog", + "range": [ + 1, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"tater.man\"", + "string": "tater.man", + "range": [ + 5, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Bare", + "value": "type", + "range": [ + 18, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "BasicString", + "value": "\"pug\"", + "string": "pug", + "range": [ + 30, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "comments": [], + "range": [ + 0, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-2-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-2-value.json new file mode 100644 index 0000000..a680d61 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-2-value.json @@ -0,0 +1,9 @@ +{ + "dog": { + "tater.man": { + "type": { + "name": "pug" + } + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-3-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-3-output.json new file mode 100644 index 0000000..ec8bb05 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-3-output.json @@ -0,0 +1,1015 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "resolvedKey": [ + "a", + "b", + "c" + ], + "body": [], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "e", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "f", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "range": [ + 45, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "resolvedKey": [ + "d", + "e", + "f" + ], + "body": [], + "range": [ + 43, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "g", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "h", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "TOMLBare", + "name": "i", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "range": [ + 82, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "resolvedKey": [ + "g", + "h", + "i" + ], + "body": [], + "range": [ + 80, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "j", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "ʞ", + "style": "basic", + "multiline": false, + "range": [ + 123, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "l", + "style": "literal", + "multiline": false, + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "range": [ + 119, + 132 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "resolvedKey": [ + "j", + "ʞ", + "l" + ], + "body": [], + "range": [ + 117, + 134 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "range": [ + 0, + 134 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "e", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "f", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "g", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "h", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Bare", + "value": "i", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "j", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"ʞ\"", + "string": "ʞ", + "range": [ + 123, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "LiteralString", + "value": "'l'", + "string": "l", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " this is best practice", + "range": [ + 19, + 42 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 42 + } + } + }, + { + "type": "Block", + "value": " same as [d.e.f]", + "range": [ + 62, + 79 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "Block", + "value": " same as [g.h.i]", + "range": [ + 99, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "Block", + "value": " same as [j.\"ʞ\".'l']", + "range": [ + 136, + 157 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 40 + } + } + } + ], + "range": [ + 0, + 158 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-3-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-3-value.json new file mode 100644 index 0000000..3572054 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-3-value.json @@ -0,0 +1,22 @@ +{ + "a": { + "b": { + "c": {} + } + }, + "d": { + "e": { + "f": {} + } + }, + "g": { + "h": { + "i": {} + } + }, + "j": { + "ʞ": { + "l": {} + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-4-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-4-output.json new file mode 100644 index 0000000..c6c54c1 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-4-output.json @@ -0,0 +1,524 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "y", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "z", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "w", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "range": [ + 46, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "resolvedKey": [ + "x", + "y", + "z", + "w" + ], + "body": [], + "range": [ + 45, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + ], + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "resolvedKey": [ + "x" + ], + "body": [], + "range": [ + 75, + 78 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + } + ], + "range": [ + 45, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "z", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "w", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " [x] you", + "range": [ + 0, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Block", + "value": " [x.y] don't", + "range": [ + 10, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Block", + "value": " [x.y.z] need these", + "range": [ + 24, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Block", + "value": " for this to work", + "range": [ + 55, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Block", + "value": " defining a super-table afterward is ok", + "range": [ + 79, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 44 + } + } + } + ], + "range": [ + 0, + 120 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-without-super-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-4-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-without-super-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-4-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-5-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-5-output.json new file mode 100644 index 0000000..055d92a --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-5-output.json @@ -0,0 +1,510 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "range": [ + 25, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "resolvedKey": [ + "fruit", + "apple" + ], + "body": [], + "range": [ + 24, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "animal", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "resolvedKey": [ + "animal" + ], + "body": [], + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "range": [ + 48, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "resolvedKey": [ + "fruit", + "orange" + ], + "body": [], + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "range": [ + 24, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "animal", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " VALID BUT DISCOURAGED", + "range": [ + 0, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "range": [ + 0, + 62 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-5-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-5-value.json new file mode 100644 index 0000000..f0436f7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-5-value.json @@ -0,0 +1,7 @@ +{ + "fruit": { + "apple": {}, + "orange": {} + }, + "animal": {} +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-6-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-6-output.json new file mode 100644 index 0000000..bd4a672 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-6-output.json @@ -0,0 +1,510 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "range": [ + 15, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "resolvedKey": [ + "fruit", + "apple" + ], + "body": [], + "range": [ + 14, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "orange", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "range": [ + 29, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "resolvedKey": [ + "fruit", + "orange" + ], + "body": [], + "range": [ + 28, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "animal", + "range": [ + 44, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + ], + "range": [ + 44, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "resolvedKey": [ + "animal" + ], + "body": [], + "range": [ + 43, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "range": [ + 14, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "orange", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "animal", + "range": [ + 44, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " RECOMMENDED", + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + } + } + ], + "range": [ + 0, + 52 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-6-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-6-value.json new file mode 100644 index 0000000..f0436f7 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-6-value.json @@ -0,0 +1,7 @@ +{ + "fruit": { + "apple": {}, + "orange": {} + }, + "animal": {} +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-7-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-7-output.json new file mode 100644 index 0000000..e23e050 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-7-output.json @@ -0,0 +1,711 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + } + ], + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Fido", + "style": "basic", + "multiline": false, + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "breed", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + } + ], + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "pug", + "style": "basic", + "multiline": false, + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 40, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "owner", + "range": [ + 80, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + ], + "range": [ + 80, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "resolvedKey": [ + "owner" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Regina Dogman", + "style": "basic", + "multiline": false, + "range": [ + 94, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "range": [ + 87, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "member_since", + "range": [ + 110, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 12 + } + } + } + ], + "range": [ + 110, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "local-date", + "value": "1999-08-04T00:00:00.000Z", + "datetime": "1999-08-04", + "range": [ + 125, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 110, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + ], + "range": [ + 79, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + ], + "range": [ + 26, + 135 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "name", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Fido\"", + "string": "Fido", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "breed", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "BasicString", + "value": "\"pug\"", + "string": "pug", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "owner", + "range": [ + 80, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "BasicString", + "value": "\"Regina Dogman\"", + "string": "Regina Dogman", + "range": [ + 94, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "member_since", + "range": [ + 110, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "LocalDate", + "value": "1999-08-04", + "range": [ + 125, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Top-level table begins.", + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + { + "type": "Block", + "value": " Top-level table ends.", + "range": [ + 55, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 0, + 136 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-7-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-7-value.json new file mode 100644 index 0000000..e70ed88 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-7-value.json @@ -0,0 +1,8 @@ +{ + "name": "Fido", + "breed": "pug", + "owner": { + "name": "Regina Dogman", + "member_since": "1999-08-04T00:00:00.000Z" + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-8-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-8-output.json new file mode 100644 index 0000000..589e68d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-8-output.json @@ -0,0 +1,643 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 12, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "range": [ + 0, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "TOMLBare", + "name": "taste", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "TOMLBare", + "name": "sweet", + "range": [ + 111, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 93, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 119, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 93, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 30 + } + } + } + ], + "range": [ + 0, + 123 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 30 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "fruit", + "range": [ + 0, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 12, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "taste", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "sweet", + "range": [ + 111, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 119, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 30 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Defines a table named fruit", + "range": [ + 26, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + { + "type": "Block", + "value": " Defines a table named fruit.apple", + "range": [ + 56, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "Block", + "value": " Defines a table named fruit.apple.taste", + "range": [ + 124, + 165 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + { + "type": "Block", + "value": " fruit and fruit.apple were already created", + "range": [ + 166, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 44 + } + } + } + ], + "range": [ + 0, + 211 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-8-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-8-value.json new file mode 100644 index 0000000..26287bf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-8-value.json @@ -0,0 +1,10 @@ +{ + "fruit": { + "apple": { + "color": "red", + "taste": { + "sweet": true + } + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-9-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-9-output.json new file mode 100644 index 0000000..1f99b35 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-9-output.json @@ -0,0 +1,983 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "resolvedKey": [ + "fruit" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 8, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 8, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "taste", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "TOMLBare", + "name": "sweet", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "range": [ + 28, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 28, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 0, + 52 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 116, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "TOMLBare", + "name": "texture", + "range": [ + 128, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "range": [ + 116, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "resolvedKey": [ + "fruit", + "apple", + "texture" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "smooth", + "range": [ + 163, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 6 + } + } + } + ], + "range": [ + 163, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "boolean", + "value": true, + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "range": [ + 163, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + ], + "range": [ + 115, + 176 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + ], + "range": [ + 0, + 176 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "taste", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Bare", + "value": "sweet", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 116, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "Bare", + "value": "texture", + "range": [ + 128, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "smooth", + "range": [ + 163, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Boolean", + "value": "true", + "boolean": true, + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " [fruit.apple] # INVALID", + "range": [ + 54, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + { + "type": "Block", + "value": " [fruit.apple.taste] # INVALID", + "range": [ + 81, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + { + "type": "Block", + "value": " you can add sub-tables", + "range": [ + 138, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 47 + } + } + } + ], + "range": [ + 0, + 177 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-9-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-9-value.json new file mode 100644 index 0000000..3fd520e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/spec/table-9-value.json @@ -0,0 +1,13 @@ +{ + "fruit": { + "apple": { + "color": "red", + "taste": { + "sweet": true + }, + "texture": { + "smooth": true + } + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/double-quote-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/double-quote-escape-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/double-quote-escape-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/double-quote-escape-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/double-quote-escape-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/double-quote-escape-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/double-quote-escape-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/double-quote-escape-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/empty-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-empty-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/empty-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/ends-in-whitespace-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/ends-in-whitespace-escape-output.json new file mode 100644 index 0000000..7a98813 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/ends-in-whitespace-escape-output.json @@ -0,0 +1,172 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "beee", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "heeee\ngeeee", + "style": "basic", + "multiline": true, + "range": [ + 7, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "range": [ + 0, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "range": [ + 0, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "beee", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nheeee\ngeeee\\ \n\n\n \"\"\"", + "string": "heeee\ngeeee", + "range": [ + 7, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "comments": [], + "range": [ + 0, + 38 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/ends-in-whitespace-escape-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/ends-in-whitespace-escape-value.json new file mode 100644 index 0000000..3b2dddb --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/ends-in-whitespace-escape-value.json @@ -0,0 +1,3 @@ +{ + "beee": "heeee\ngeeee" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-esc-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-esc-output.json new file mode 100644 index 0000000..c2d5c89 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-esc-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:1,column:8" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/multiline-string-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-tricky-output.json similarity index 70% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/multiline-string-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-tricky-output.json index a317d00..b4909ab 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/multiline-string-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-tricky-output.json @@ -11,10 +11,10 @@ "keys": [ { "type": "TOMLBare", - "name": "multiline_empty_one", + "name": "end_esc", "range": [ 0, - 19 + 7 ], "loc": { "start": { @@ -23,14 +23,14 @@ }, "end": { "line": 1, - "column": 19 + "column": 7 } } } ], "range": [ 0, - 19 + 7 ], "loc": { "start": { @@ -39,34 +39,34 @@ }, "end": { "line": 1, - "column": 19 + "column": 7 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "", + "value": "String does not end here\" but ends here\\", "style": "basic", - "multiline": true, + "multiline": false, "range": [ - 22, - 28 + 10, + 54 ], "loc": { "start": { "line": 1, - "column": 22 + "column": 10 }, "end": { "line": 1, - "column": 28 + "column": 54 } } }, "range": [ 0, - 28 + 54 ], "loc": { "start": { @@ -75,7 +75,7 @@ }, "end": { "line": 1, - "column": 28 + "column": 54 } } }, @@ -86,10 +86,10 @@ "keys": [ { "type": "TOMLBare", - "name": "multiline_empty_two", + "name": "lit_end_esc", "range": [ - 29, - 48 + 55, + 66 ], "loc": { "start": { @@ -98,14 +98,14 @@ }, "end": { "line": 2, - "column": 19 + "column": 11 } } } ], "range": [ - 29, - 48 + 55, + 66 ], "loc": { "start": { @@ -114,34 +114,34 @@ }, "end": { "line": 2, - "column": 19 + "column": 11 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "", - "style": "basic", - "multiline": true, + "value": "String ends here\\", + "style": "literal", + "multiline": false, "range": [ - 51, - 58 + 69, + 88 ], "loc": { "start": { "line": 2, - "column": 22 + "column": 14 }, "end": { - "line": 3, - "column": 3 + "line": 2, + "column": 33 } } }, "range": [ - 29, - 58 + 55, + 88 ], "loc": { "start": { @@ -149,8 +149,8 @@ "column": 0 }, "end": { - "line": 3, - "column": 3 + "line": 2, + "column": 33 } } }, @@ -161,10 +161,10 @@ "keys": [ { "type": "TOMLBare", - "name": "multiline_empty_three", + "name": "multiline_unicode", "range": [ - 59, - 80 + 90, + 107 ], "loc": { "start": { @@ -173,14 +173,14 @@ }, "end": { "line": 4, - "column": 21 + "column": 17 } } } ], "range": [ - 59, - 80 + 90, + 107 ], "loc": { "start": { @@ -189,34 +189,34 @@ }, "end": { "line": 4, - "column": 21 + "column": 17 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "", + "value": " ", "style": "basic", "multiline": true, "range": [ - 83, - 95 + 110, + 123 ], "loc": { "start": { "line": 4, - "column": 24 + "column": 20 }, "end": { "line": 5, - "column": 7 + "column": 9 } } }, "range": [ - 59, - 95 + 90, + 123 ], "loc": { "start": { @@ -225,7 +225,7 @@ }, "end": { "line": 5, - "column": 7 + "column": 9 } } }, @@ -236,71 +236,71 @@ "keys": [ { "type": "TOMLBare", - "name": "multiline_empty_four", + "name": "multiline_not_unicode", "range": [ - 96, - 116 + 125, + 146 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 0 }, "end": { - "line": 6, - "column": 20 + "line": 7, + "column": 21 } } } ], "range": [ - 96, - 116 + 125, + 146 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 0 }, "end": { - "line": 6, - "column": 20 + "line": 7, + "column": 21 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "", + "value": "\\u0041", "style": "basic", "multiline": true, "range": [ - 119, - 140 + 149, + 163 ], "loc": { "start": { - "line": 6, - "column": 23 + "line": 7, + "column": 24 }, "end": { - "line": 9, - "column": 6 + "line": 8, + "column": 10 } } }, "range": [ - 96, - 140 + 125, + 163 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 0 }, "end": { - "line": 9, - "column": 6 + "line": 8, + "column": 10 } } }, @@ -311,71 +311,71 @@ "keys": [ { "type": "TOMLBare", - "name": "equivalent_one", + "name": "multiline_end_esc", "range": [ - 142, - 156 + 165, + 182 ], "loc": { "start": { - "line": 11, + "line": 10, "column": 0 }, "end": { - "line": 11, - "column": 14 + "line": 10, + "column": 17 } } } ], "range": [ - 142, - 156 + 165, + 182 ], "loc": { "start": { - "line": 11, + "line": 10, "column": 0 }, "end": { - "line": 11, - "column": 14 + "line": 10, + "column": 17 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "The quick brown fox jumps over the lazy dog.", + "value": "When will it end? \"\"\"...\"\"\" should be here\"", "style": "basic", - "multiline": false, + "multiline": true, "range": [ - 159, - 205 + 185, + 237 ], "loc": { "start": { - "line": 11, - "column": 17 + "line": 10, + "column": 20 }, "end": { - "line": 11, - "column": 63 + "line": 10, + "column": 72 } } }, "range": [ - 142, - 205 + 165, + 237 ], "loc": { "start": { - "line": 11, + "line": 10, "column": 0 }, "end": { - "line": 11, - "column": 63 + "line": 10, + "column": 72 } } }, @@ -386,10 +386,10 @@ "keys": [ { "type": "TOMLBare", - "name": "equivalent_two", + "name": "lit_multiline_not_unicode", "range": [ - 206, - 220 + 239, + 264 ], "loc": { "start": { @@ -398,14 +398,14 @@ }, "end": { "line": 12, - "column": 14 + "column": 25 } } } ], "range": [ - 206, - 220 + 239, + 264 ], "loc": { "start": { @@ -414,34 +414,34 @@ }, "end": { "line": 12, - "column": 14 + "column": 25 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "The quick brown fox jumps over the lazy dog.", - "style": "basic", + "value": "\\u007f", + "style": "literal", "multiline": true, "range": [ - 223, - 286 + 267, + 280 ], "loc": { "start": { "line": 12, - "column": 17 + "column": 28 }, "end": { - "line": 17, - "column": 20 + "line": 13, + "column": 9 } } }, "range": [ - 206, - 286 + 239, + 280 ], "loc": { "start": { @@ -449,8 +449,8 @@ "column": 0 }, "end": { - "line": 17, - "column": 20 + "line": 13, + "column": 9 } } }, @@ -461,78 +461,78 @@ "keys": [ { "type": "TOMLBare", - "name": "equivalent_three", + "name": "lit_multiline_end", "range": [ - 288, - 304 + 282, + 299 ], "loc": { "start": { - "line": 19, + "line": 15, "column": 0 }, "end": { - "line": 19, - "column": 16 + "line": 15, + "column": 17 } } } ], "range": [ - 288, - 304 + 282, + 299 ], "loc": { "start": { - "line": 19, + "line": 15, "column": 0 }, "end": { - "line": 19, - "column": 16 + "line": 15, + "column": 17 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "The quick brown fox jumps over the lazy dog.", - "style": "basic", + "value": "There is no escape\\", + "style": "literal", "multiline": true, "range": [ - 307, - 393 + 302, + 327 ], "loc": { "start": { - "line": 19, - "column": 19 + "line": 15, + "column": 20 }, "end": { - "line": 23, - "column": 10 + "line": 15, + "column": 45 } } }, "range": [ - 288, - 393 + 282, + 327 ], "loc": { "start": { - "line": 19, + "line": 15, "column": 0 }, "end": { - "line": 23, - "column": 10 + "line": 15, + "column": 45 } } } ], "range": [ 0, - 393 + 327 ], "loc": { "start": { @@ -540,8 +540,8 @@ "column": 0 }, "end": { - "line": 23, - "column": 10 + "line": 15, + "column": 45 } } } @@ -550,10 +550,10 @@ "tokens": [ { "type": "Bare", - "value": "multiline_empty_one", + "value": "end_esc", "range": [ 0, - 19 + 7 ], "loc": { "start": { @@ -562,7 +562,7 @@ }, "end": { "line": 1, - "column": 19 + "column": 7 } } }, @@ -570,45 +570,45 @@ "type": "Punctuator", "value": "=", "range": [ - 20, - 21 + 8, + 9 ], "loc": { "start": { "line": 1, - "column": 20 + "column": 8 }, "end": { "line": 1, - "column": 21 + "column": 9 } } }, { - "type": "MultiLineBasicString", - "value": "\"\"\"\"\"\"", - "string": "", + "type": "BasicString", + "value": "\"String does not end here\\\" but ends here\\\\\"", + "string": "String does not end here\" but ends here\\", "range": [ - 22, - 28 + 10, + 54 ], "loc": { "start": { "line": 1, - "column": 22 + "column": 10 }, "end": { "line": 1, - "column": 28 + "column": 54 } } }, { "type": "Bare", - "value": "multiline_empty_two", + "value": "lit_end_esc", "range": [ - 29, - 48 + 55, + 66 ], "loc": { "start": { @@ -617,7 +617,7 @@ }, "end": { "line": 2, - "column": 19 + "column": 11 } } }, @@ -625,45 +625,45 @@ "type": "Punctuator", "value": "=", "range": [ - 49, - 50 + 67, + 68 ], "loc": { "start": { "line": 2, - "column": 20 + "column": 12 }, "end": { "line": 2, - "column": 21 + "column": 13 } } }, { - "type": "MultiLineBasicString", - "value": "\"\"\"\n\"\"\"", - "string": "", + "type": "LiteralString", + "value": "'String ends here\\'", + "string": "String ends here\\", "range": [ - 51, - 58 + 69, + 88 ], "loc": { "start": { "line": 2, - "column": 22 + "column": 14 }, "end": { - "line": 3, - "column": 3 + "line": 2, + "column": 33 } } }, { "type": "Bare", - "value": "multiline_empty_three", + "value": "multiline_unicode", "range": [ - 59, - 80 + 90, + 107 ], "loc": { "start": { @@ -672,7 +672,7 @@ }, "end": { "line": 4, - "column": 21 + "column": 17 } } }, @@ -680,54 +680,54 @@ "type": "Punctuator", "value": "=", "range": [ - 81, - 82 + 108, + 109 ], "loc": { "start": { "line": 4, - "column": 22 + "column": 18 }, "end": { "line": 4, - "column": 23 + "column": 19 } } }, { "type": "MultiLineBasicString", - "value": "\"\"\"\\\n \"\"\"", - "string": "", + "value": "\"\"\"\n\\u00a0\"\"\"", + "string": " ", "range": [ - 83, - 95 + 110, + 123 ], "loc": { "start": { "line": 4, - "column": 24 + "column": 20 }, "end": { "line": 5, - "column": 7 + "column": 9 } } }, { "type": "Bare", - "value": "multiline_empty_four", + "value": "multiline_not_unicode", "range": [ - 96, - 116 + 125, + 146 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 0 }, "end": { - "line": 6, - "column": 20 + "line": 7, + "column": 21 } } }, @@ -735,54 +735,54 @@ "type": "Punctuator", "value": "=", "range": [ - 117, - 118 + 147, + 148 ], "loc": { "start": { - "line": 6, - "column": 21 + "line": 7, + "column": 22 }, "end": { - "line": 6, - "column": 22 + "line": 7, + "column": 23 } } }, { "type": "MultiLineBasicString", - "value": "\"\"\"\\\n \\\n \\\n \"\"\"", - "string": "", + "value": "\"\"\"\n\\\\u0041\"\"\"", + "string": "\\u0041", "range": [ - 119, - 140 + 149, + 163 ], "loc": { "start": { - "line": 6, - "column": 23 + "line": 7, + "column": 24 }, "end": { - "line": 9, - "column": 6 + "line": 8, + "column": 10 } } }, { "type": "Bare", - "value": "equivalent_one", + "value": "multiline_end_esc", "range": [ - 142, - 156 + 165, + 182 ], "loc": { "start": { - "line": 11, + "line": 10, "column": 0 }, "end": { - "line": 11, - "column": 14 + "line": 10, + "column": 17 } } }, @@ -790,45 +790,45 @@ "type": "Punctuator", "value": "=", "range": [ - 157, - 158 + 183, + 184 ], "loc": { "start": { - "line": 11, - "column": 15 + "line": 10, + "column": 18 }, "end": { - "line": 11, - "column": 16 + "line": 10, + "column": 19 } } }, { - "type": "BasicString", - "value": "\"The quick brown fox jumps over the lazy dog.\"", - "string": "The quick brown fox jumps over the lazy dog.", + "type": "MultiLineBasicString", + "value": "\"\"\"When will it end? \\\"\"\"...\"\"\\\" should be here\\\"\"\"\"", + "string": "When will it end? \"\"\"...\"\"\" should be here\"", "range": [ - 159, - 205 + 185, + 237 ], "loc": { "start": { - "line": 11, - "column": 17 + "line": 10, + "column": 20 }, "end": { - "line": 11, - "column": 63 + "line": 10, + "column": 72 } } }, { "type": "Bare", - "value": "equivalent_two", + "value": "lit_multiline_not_unicode", "range": [ - 206, - 220 + 239, + 264 ], "loc": { "start": { @@ -837,7 +837,7 @@ }, "end": { "line": 12, - "column": 14 + "column": 25 } } }, @@ -845,54 +845,54 @@ "type": "Punctuator", "value": "=", "range": [ - 221, - 222 + 265, + 266 ], "loc": { "start": { "line": 12, - "column": 15 + "column": 26 }, "end": { "line": 12, - "column": 16 + "column": 27 } } }, { - "type": "MultiLineBasicString", - "value": "\"\"\"\nThe quick brown \\\n\n\n fox jumps over \\\n the lazy dog.\"\"\"", - "string": "The quick brown fox jumps over the lazy dog.", + "type": "MultiLineLiteralString", + "value": "'''\n\\u007f'''", + "string": "\\u007f", "range": [ - 223, - 286 + 267, + 280 ], "loc": { "start": { "line": 12, - "column": 17 + "column": 28 }, "end": { - "line": 17, - "column": 20 + "line": 13, + "column": 9 } } }, { "type": "Bare", - "value": "equivalent_three", + "value": "lit_multiline_end", "range": [ - 288, - 304 + 282, + 299 ], "loc": { "start": { - "line": 19, + "line": 15, "column": 0 }, "end": { - "line": 19, - "column": 16 + "line": 15, + "column": 17 } } }, @@ -900,36 +900,36 @@ "type": "Punctuator", "value": "=", "range": [ - 305, - 306 + 300, + 301 ], "loc": { "start": { - "line": 19, - "column": 17 + "line": 15, + "column": 18 }, "end": { - "line": 19, - "column": 18 + "line": 15, + "column": 19 } } }, { - "type": "MultiLineBasicString", - "value": "\"\"\"\\\n The quick brown \\\n fox jumps over \\\n the lazy dog.\\\n \"\"\"", - "string": "The quick brown fox jumps over the lazy dog.", + "type": "MultiLineLiteralString", + "value": "'''There is no escape\\'''", + "string": "There is no escape\\", "range": [ - 307, - 393 + 302, + 327 ], "loc": { "start": { - "line": 19, - "column": 19 + "line": 15, + "column": 20 }, "end": { - "line": 23, - "column": 10 + "line": 15, + "column": 45 } } } @@ -937,7 +937,7 @@ "comments": [], "range": [ 0, - 394 + 328 ], "loc": { "start": { @@ -945,7 +945,7 @@ "column": 0 }, "end": { - "line": 24, + "line": 16, "column": 0 } } diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-tricky-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-tricky-value.json new file mode 100644 index 0000000..7774244 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escape-tricky-value.json @@ -0,0 +1,9 @@ +{ + "end_esc": "String does not end here\" but ends here\\", + "lit_end_esc": "String ends here\\", + "multiline_unicode": " ", + "multiline_not_unicode": "\\u0041", + "multiline_end_esc": "When will it end? \"\"\"...\"\"\" should be here\"", + "lit_multiline_not_unicode": "\\u007f", + "lit_multiline_end": "There is no escape\\" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/escaped-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escaped-escape-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/escaped-escape-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escaped-escape-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/escaped-escape-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escaped-escape-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/escaped-escape-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escaped-escape-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-escapes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escapes-output.json similarity index 84% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-escapes-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escapes-output.json index 5b7ac75..6b52f14 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-escapes-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escapes-output.json @@ -828,11 +828,161 @@ "column": 68 } } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "delete", + "range": [ + 642, + 648 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 6 + } + } + } + ], + "range": [ + 642, + 648 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "This string has a  delete control code.", + "style": "basic", + "multiline": false, + "range": [ + 651, + 698 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + "range": [ + 642, + 698 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "unitseparator", + "range": [ + 699, + 712 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "range": [ + 699, + 712 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "This string has a \u001f unit separator control code.", + "style": "basic", + "multiline": false, + "range": [ + 715, + 770 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 71 + } + } + }, + "range": [ + 699, + 770 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 71 + } + } } ], "range": [ 0, - 641 + 770 ], "loc": { "start": { @@ -840,8 +990,8 @@ "column": 0 }, "end": { - "line": 11, - "column": 68 + "line": 13, + "column": 71 } } } @@ -1452,12 +1602,122 @@ "column": 68 } } + }, + { + "type": "Bare", + "value": "delete", + "range": [ + 642, + 648 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 649, + 650 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "BasicString", + "value": "\"This string has a \\u007F delete control code.\"", + "string": "This string has a  delete control code.", + "range": [ + 651, + 698 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + { + "type": "Bare", + "value": "unitseparator", + "range": [ + 699, + 712 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 713, + 714 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "BasicString", + "value": "\"This string has a \\u001F unit separator control code.\"", + "string": "This string has a \u001f unit separator control code.", + "range": [ + 715, + 770 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 71 + } + } } ], "comments": [], "range": [ 0, - 642 + 771 ], "loc": { "start": { @@ -1465,7 +1725,7 @@ "column": 0 }, "end": { - "line": 12, + "line": 14, "column": 0 } } diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-escapes-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escapes-value.json similarity index 83% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-escapes-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escapes-value.json index e672cb7..57d9977 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-escapes-value.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/escapes-value.json @@ -9,5 +9,7 @@ "notunicode1": "This string does not have a unicode \\u escape.", "notunicode2": "This string does not have a unicode \\u escape.", "notunicode3": "This string does not have a unicode \\u0075 escape.", - "notunicode4": "This string does not have a unicode \\u escape." + "notunicode4": "This string does not have a unicode \\u escape.", + "delete": "This string has a  delete control code.", + "unitseparator": "This string has a \u001f unit separator control code." } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/hex-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/hex-escape-output.json new file mode 100644 index 0000000..54c0e9b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/hex-escape-output.json @@ -0,0 +1 @@ +"Invalid character in escape sequence@line:3,column:20" \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-escaped-crlf-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-escaped-crlf-output.json new file mode 100644 index 0000000..b206a9d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-escaped-crlf-output.json @@ -0,0 +1,209 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "0", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + } + ], + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "", + "style": "basic", + "multiline": true, + "range": [ + 108, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + "range": [ + 106, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "range": [ + 106, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "0", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\\r\n\"\"\"", + "string": "", + "range": [ + 108, + 117 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " The following line should be an unescaped backslash followed by a Windows", + "range": [ + 0, + 75 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 75 + } + } + }, + { + "type": "Block", + "value": " newline sequence (\"\\r\\n\")", + "range": [ + 77, + 104 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + ], + "range": [ + 0, + 119 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-escaped-crlf-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-escaped-crlf-value.json new file mode 100644 index 0000000..df24a1d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-escaped-crlf-value.json @@ -0,0 +1,3 @@ +{ + "0": "" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-output.json new file mode 100644 index 0000000..ba2dedc --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-output.json @@ -0,0 +1,1823 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multiline_empty_one", + "range": [ + 57, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "range": [ + 57, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "", + "style": "basic", + "multiline": true, + "range": [ + 79, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "range": [ + 57, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multiline_empty_two", + "range": [ + 160, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 160, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "", + "style": "basic", + "multiline": true, + "range": [ + 182, + 189 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "range": [ + 160, + 189 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multiline_empty_three", + "range": [ + 303, + 324 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 21 + } + } + } + ], + "range": [ + 303, + 324 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "", + "style": "basic", + "multiline": true, + "range": [ + 327, + 339 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "range": [ + 303, + 339 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multiline_empty_four", + "range": [ + 340, + 360 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 20 + } + } + } + ], + "range": [ + 340, + 360 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "", + "style": "basic", + "multiline": true, + "range": [ + 363, + 386 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + "range": [ + 340, + 386 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "equivalent_one", + "range": [ + 388, + 402 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 14 + } + } + } + ], + "range": [ + 388, + 402 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": false, + "range": [ + 405, + 451 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 63 + } + } + }, + "range": [ + 388, + 451 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 63 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "equivalent_two", + "range": [ + 452, + 466 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 14 + } + } + } + ], + "range": [ + 452, + 466 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": true, + "range": [ + 469, + 532 + ], + "loc": { + "start": { + "line": 19, + "column": 17 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "range": [ + 452, + 532 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "equivalent_three", + "range": [ + 534, + 550 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 16 + } + } + } + ], + "range": [ + 534, + 550 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": true, + "range": [ + 553, + 639 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + "range": [ + 534, + 639 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "whitespace-after-bs", + "range": [ + 641, + 660 + ], + "loc": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 19 + } + } + } + ], + "range": [ + 641, + 660 + ], + "loc": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 19 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "The quick brown fox jumps over the lazy dog.", + "style": "basic", + "multiline": true, + "range": [ + 663, + 753 + ], + "loc": { + "start": { + "line": 32, + "column": 22 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "range": [ + 641, + 753 + ], + "loc": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "no-space", + "range": [ + 755, + 763 + ], + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 38, + "column": 8 + } + } + } + ], + "range": [ + 755, + 763 + ], + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 38, + "column": 8 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "ab", + "style": "basic", + "multiline": true, + "range": [ + 766, + 780 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 39, + "column": 8 + } + } + }, + "range": [ + 755, + 780 + ], + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 39, + "column": 8 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "keep-ws-before", + "range": [ + 803, + 817 + ], + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 42, + "column": 14 + } + } + } + ], + "range": [ + 803, + 817 + ], + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a \tb", + "style": "basic", + "multiline": true, + "range": [ + 820, + 837 + ], + "loc": { + "start": { + "line": 42, + "column": 17 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "range": [ + 803, + 837 + ], + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "escape-bs-1", + "range": [ + 839, + 850 + ], + "loc": { + "start": { + "line": 45, + "column": 0 + }, + "end": { + "line": 45, + "column": 11 + } + } + } + ], + "range": [ + 839, + 850 + ], + "loc": { + "start": { + "line": 45, + "column": 0 + }, + "end": { + "line": 45, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a \\\nb", + "style": "basic", + "multiline": true, + "range": [ + 853, + 865 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 46, + "column": 4 + } + } + }, + "range": [ + 839, + 865 + ], + "loc": { + "start": { + "line": 45, + "column": 0 + }, + "end": { + "line": 46, + "column": 4 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "escape-bs-2", + "range": [ + 867, + 878 + ], + "loc": { + "start": { + "line": 48, + "column": 0 + }, + "end": { + "line": 48, + "column": 11 + } + } + } + ], + "range": [ + 867, + 878 + ], + "loc": { + "start": { + "line": 48, + "column": 0 + }, + "end": { + "line": 48, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a \\b", + "style": "basic", + "multiline": true, + "range": [ + 881, + 894 + ], + "loc": { + "start": { + "line": 48, + "column": 14 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + "range": [ + 867, + 894 + ], + "loc": { + "start": { + "line": 48, + "column": 0 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "escape-bs-3", + "range": [ + 896, + 907 + ], + "loc": { + "start": { + "line": 51, + "column": 0 + }, + "end": { + "line": 51, + "column": 11 + } + } + } + ], + "range": [ + 896, + 907 + ], + "loc": { + "start": { + "line": 51, + "column": 0 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a \\\\\n b", + "style": "basic", + "multiline": true, + "range": [ + 910, + 926 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 52, + "column": 6 + } + } + }, + "range": [ + 896, + 926 + ], + "loc": { + "start": { + "line": 51, + "column": 0 + }, + "end": { + "line": 52, + "column": 6 + } + } + } + ], + "range": [ + 57, + 926 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 52, + "column": 6 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "multiline_empty_one", + "range": [ + 57, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\"\"\"", + "string": "", + "range": [ + 79, + 85 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "Bare", + "value": "multiline_empty_two", + "range": [ + 160, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\n\"\"\"", + "string": "", + "range": [ + 182, + 189 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "multiline_empty_three", + "range": [ + 303, + 324 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 325, + 326 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\\n \"\"\"", + "string": "", + "range": [ + 327, + 339 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "multiline_empty_four", + "range": [ + 340, + 360 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 361, + 362 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\\n \\\n \\ \n \"\"\"", + "string": "", + "range": [ + 363, + 386 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "equivalent_one", + "range": [ + 388, + 402 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 403, + 404 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"The quick brown fox jumps over the lazy dog.\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 405, + 451 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 63 + } + } + }, + { + "type": "Bare", + "value": "equivalent_two", + "range": [ + 452, + 466 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 467, + 468 + ], + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nThe quick brown \\\n\n\n fox jumps over \\\n the lazy dog.\"\"\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 469, + 532 + ], + "loc": { + "start": { + "line": 19, + "column": 17 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + { + "type": "Bare", + "value": "equivalent_three", + "range": [ + 534, + 550 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 551, + 552 + ], + "loc": { + "start": { + "line": 26, + "column": 17 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\\n The quick brown \\\n fox jumps over \\\n the lazy dog.\\\n \"\"\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 553, + 639 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "whitespace-after-bs", + "range": [ + 641, + 660 + ], + "loc": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 661, + 662 + ], + "loc": { + "start": { + "line": 32, + "column": 20 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\\n The quick brown \\\n fox jumps over \\ \n the lazy dog.\\\t\n \"\"\"", + "string": "The quick brown fox jumps over the lazy dog.", + "range": [ + 663, + 753 + ], + "loc": { + "start": { + "line": 32, + "column": 22 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "no-space", + "range": [ + 755, + 763 + ], + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 38, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 764, + 765 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"a\\\n b\"\"\"", + "string": "ab", + "range": [ + 766, + 780 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 39, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "keep-ws-before", + "range": [ + 803, + 817 + ], + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 818, + 819 + ], + "loc": { + "start": { + "line": 42, + "column": 15 + }, + "end": { + "line": 42, + "column": 16 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"a \t\\\n b\"\"\"", + "string": "a \tb", + "range": [ + 820, + 837 + ], + "loc": { + "start": { + "line": 42, + "column": 17 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "escape-bs-1", + "range": [ + 839, + 850 + ], + "loc": { + "start": { + "line": 45, + "column": 0 + }, + "end": { + "line": 45, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 851, + 852 + ], + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 13 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"a \\\\\nb\"\"\"", + "string": "a \\\nb", + "range": [ + 853, + 865 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 46, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "escape-bs-2", + "range": [ + 867, + 878 + ], + "loc": { + "start": { + "line": 48, + "column": 0 + }, + "end": { + "line": 48, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 879, + 880 + ], + "loc": { + "start": { + "line": 48, + "column": 12 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"a \\\\\\\nb\"\"\"", + "string": "a \\b", + "range": [ + 881, + 894 + ], + "loc": { + "start": { + "line": 48, + "column": 14 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "escape-bs-3", + "range": [ + 896, + 907 + ], + "loc": { + "start": { + "line": 51, + "column": 0 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 908, + 909 + ], + "loc": { + "start": { + "line": 51, + "column": 12 + }, + "end": { + "line": 51, + "column": 13 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"a \\\\\\\\\n b\"\"\"", + "string": "a \\\\\n b", + "range": [ + 910, + 926 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 52, + "column": 6 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " NOTE: this file includes some literal tab characters.", + "range": [ + 0, + 55 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 55 + } + } + }, + { + "type": "Block", + "value": " A newline immediately following the opening delimiter will be trimmed.", + "range": [ + 87, + 159 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 72 + } + } + }, + { + "type": "Block", + "value": " \\ at the end of line trims newlines as well; note that last \\ is followed by", + "range": [ + 191, + 269 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 78 + } + } + }, + { + "type": "Block", + "value": " two spaces, which are ignored.", + "range": [ + 270, + 302 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "Block", + "value": " Has tab character.", + "range": [ + 782, + 802 + ], + "loc": { + "start": { + "line": 41, + "column": 0 + }, + "end": { + "line": 41, + "column": 20 + } + } + } + ], + "range": [ + 0, + 927 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 53, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-quotes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-quotes-output.json new file mode 100644 index 0000000..895b516 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-quotes-output.json @@ -0,0 +1,1805 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lit_one", + "range": [ + 138, + 145 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + ], + "range": [ + 138, + 145 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "'one quote'", + "style": "literal", + "multiline": true, + "range": [ + 148, + 165 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 138, + 165 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lit_two", + "range": [ + 166, + 173 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + } + ], + "range": [ + 166, + 173 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "''two quotes''", + "style": "literal", + "multiline": true, + "range": [ + 176, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 166, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lit_one_space", + "range": [ + 197, + 210 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "range": [ + 197, + 210 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": " 'one quote' ", + "style": "literal", + "multiline": true, + "range": [ + 213, + 232 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "range": [ + 197, + 232 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "lit_two_space", + "range": [ + 233, + 246 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "range": [ + 233, + 246 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": " ''two quotes'' ", + "style": "literal", + "multiline": true, + "range": [ + 249, + 271 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "range": [ + 233, + 271 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + ], + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\"one quote\"", + "style": "basic", + "multiline": true, + "range": [ + 279, + 296 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "range": [ + 273, + 296 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "two", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + } + ], + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\"\"two quotes\"\"", + "style": "basic", + "multiline": true, + "range": [ + 303, + 323 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 297, + 323 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "one_space", + "range": [ + 324, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 324, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": " \"one quote\" ", + "style": "basic", + "multiline": true, + "range": [ + 336, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 324, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "two_space", + "range": [ + 356, + 365 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 9 + } + } + } + ], + "range": [ + 356, + 365 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": " \"\"two quotes\"\" ", + "style": "basic", + "multiline": true, + "range": [ + 368, + 390 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 34 + } + } + }, + "range": [ + 356, + 390 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 34 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "mismatch1", + "range": [ + 392, + 401 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "range": [ + 392, + 401 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "aaa'''bbb", + "style": "basic", + "multiline": true, + "range": [ + 404, + 419 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "range": [ + 392, + 419 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "mismatch2", + "range": [ + 420, + 429 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + } + ], + "range": [ + 420, + 429 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "aaa\"\"\"bbb", + "style": "literal", + "multiline": true, + "range": [ + 432, + 447 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 420, + 447 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "escaped", + "range": [ + 542, + 549 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 7 + } + } + } + ], + "range": [ + 542, + 549 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "lol\"\"\"", + "style": "basic", + "multiline": true, + "range": [ + 552, + 565 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + "range": [ + 542, + 565 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "five-quotes", + "range": [ + 567, + 578 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + ], + "range": [ + 567, + 578 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Closing with five quotes\n\"\"", + "style": "basic", + "multiline": true, + "range": [ + 581, + 615 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + "range": [ + 567, + 615 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "four-quotes", + "range": [ + 616, + 627 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 11 + } + } + } + ], + "range": [ + 616, + 627 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "Closing with four quotes\n\"", + "style": "basic", + "multiline": true, + "range": [ + 630, + 663 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + "range": [ + 616, + 663 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 26, + "column": 4 + } + } + } + ], + "range": [ + 138, + 663 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 26, + "column": 4 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "lit_one", + "range": [ + 138, + 145 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "''''one quote''''", + "string": "'one quote'", + "range": [ + 148, + 165 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "lit_two", + "range": [ + 166, + 173 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''''two quotes'''''", + "string": "''two quotes''", + "range": [ + 176, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + { + "type": "Bare", + "value": "lit_one_space", + "range": [ + 197, + 210 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 211, + 212 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "''' 'one quote' '''", + "string": " 'one quote' ", + "range": [ + 213, + 232 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "Bare", + "value": "lit_two_space", + "range": [ + 233, + 246 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "''' ''two quotes'' '''", + "string": " ''two quotes'' ", + "range": [ + 249, + 271 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + { + "type": "Bare", + "value": "one", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 277, + 278 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\"one quote\"\"\"\"", + "string": "\"one quote\"", + "range": [ + 279, + 296 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "two", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\"\"two quotes\"\"\"\"\"", + "string": "\"\"two quotes\"\"", + "range": [ + 303, + 323 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + { + "type": "Bare", + "value": "one_space", + "range": [ + 324, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\" \"one quote\" \"\"\"", + "string": " \"one quote\" ", + "range": [ + 336, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "Bare", + "value": "two_space", + "range": [ + 356, + 365 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\" \"\"two quotes\"\" \"\"\"", + "string": " \"\"two quotes\"\" ", + "range": [ + 368, + 390 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 34 + } + } + }, + { + "type": "Bare", + "value": "mismatch1", + "range": [ + 392, + 401 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 402, + 403 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"aaa'''bbb\"\"\"", + "string": "aaa'''bbb", + "range": [ + 404, + 419 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "mismatch2", + "range": [ + 420, + 429 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 430, + 431 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''aaa\"\"\"bbb'''", + "string": "aaa\"\"\"bbb", + "range": [ + 432, + 447 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + { + "type": "Bare", + "value": "escaped", + "range": [ + 542, + 549 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 550, + 551 + ], + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"lol\\\"\"\"\"\"\"", + "string": "lol\"\"\"", + "range": [ + 552, + 565 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + { + "type": "Bare", + "value": "five-quotes", + "range": [ + 567, + 578 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 579, + 580 + ], + "loc": { + "start": { + "line": 21, + "column": 12 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nClosing with five quotes\n\"\"\"\"\"", + "string": "Closing with five quotes\n\"\"", + "range": [ + 581, + 615 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "four-quotes", + "range": [ + 616, + 627 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 628, + 629 + ], + "loc": { + "start": { + "line": 24, + "column": 12 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\nClosing with four quotes\n\"\"\"\"", + "string": "Closing with four quotes\n\"", + "range": [ + 630, + 663 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 26, + "column": 4 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Make sure that quotes inside multiline strings are allowed, including right", + "range": [ + 0, + 77 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 77 + } + } + }, + { + "type": "Block", + "value": " after the opening '''/\"\"\" and before the closing '''/\"\"\"", + "range": [ + 78, + 136 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 58 + } + } + }, + { + "type": "Block", + "value": " Three opening \"\"\", then one escaped \", then two \"\" (allowed), and then three", + "range": [ + 449, + 527 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 78 + } + } + }, + { + "type": "Block", + "value": " closing \"\"\"", + "range": [ + 528, + 541 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + ], + "range": [ + 0, + 664 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-quotes-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-quotes-value.json new file mode 100644 index 0000000..aa48cdd --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-quotes-value.json @@ -0,0 +1,15 @@ +{ + "lit_one": "'one quote'", + "lit_two": "''two quotes''", + "lit_one_space": " 'one quote' ", + "lit_two_space": " ''two quotes'' ", + "one": "\"one quote\"", + "two": "\"\"two quotes\"\"", + "one_space": " \"one quote\" ", + "two_space": " \"\"two quotes\"\" ", + "mismatch1": "aaa'''bbb", + "mismatch2": "aaa\"\"\"bbb", + "escaped": "lol\"\"\"", + "five-quotes": "Closing with five quotes\n\"\"", + "four-quotes": "Closing with four quotes\n\"" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/multiline-string-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-value.json similarity index 59% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/multiline-string-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-value.json index 171cb6f..e34db75 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/multiline-string-value.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/multiline-value.json @@ -5,5 +5,11 @@ "multiline_empty_four": "", "equivalent_one": "The quick brown fox jumps over the lazy dog.", "equivalent_two": "The quick brown fox jumps over the lazy dog.", - "equivalent_three": "The quick brown fox jumps over the lazy dog." + "equivalent_three": "The quick brown fox jumps over the lazy dog.", + "whitespace-after-bs": "The quick brown fox jumps over the lazy dog.", + "no-space": "ab", + "keep-ws-before": "a \tb", + "escape-bs-1": "a \\\nb", + "escape-bs-2": "a \\b", + "escape-bs-3": "a \\\\\n b" } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-nl-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/nl-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-nl-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/nl-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-nl-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/nl-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-nl-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/nl-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/quoted-unicode-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/quoted-unicode-output.json new file mode 100644 index 0000000..dadfb41 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/quoted-unicode-output.json @@ -0,0 +1,562 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "escaped_string", + "range": [ + 1, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "range": [ + 1, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\u0000 \b \f A  € ÿ ퟿  ￿ 𐀀 􏿿", + "style": "basic", + "multiline": false, + "range": [ + 18, + 115 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 114 + } + } + }, + "range": [ + 1, + 115 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 114 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "not_escaped_string", + "range": [ + 116, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "range": [ + 116, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff", + "style": "literal", + "multiline": false, + "range": [ + 137, + 234 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 118 + } + } + }, + "range": [ + 116, + 234 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 118 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "basic_string", + "range": [ + 236, + 248 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + ], + "range": [ + 236, + 248 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "style": "basic", + "multiline": false, + "range": [ + 251, + 270 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "range": [ + 236, + 270 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "literal_string", + "range": [ + 271, + 285 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [ + 271, + 285 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "style": "literal", + "multiline": false, + "range": [ + 288, + 307 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 271, + 307 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + ], + "range": [ + 1, + 307 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "escaped_string", + "range": [ + 1, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff\"", + "string": "\u0000 \b \f A  € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 18, + 115 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 114 + } + } + }, + { + "type": "Bare", + "value": "not_escaped_string", + "range": [ + 116, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "LiteralString", + "value": "'\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff'", + "string": "\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff", + "range": [ + 137, + 234 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 118 + } + } + }, + { + "type": "Bare", + "value": "basic_string", + "range": [ + 236, + 248 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "BasicString", + "value": "\"~ € ÿ ퟿  ￿ 𐀀 􏿿\"", + "string": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 251, + 270 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + { + "type": "Bare", + "value": "literal_string", + "range": [ + 271, + 285 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 286, + 287 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "LiteralString", + "value": "'~ € ÿ ퟿  ￿ 𐀀 􏿿'", + "string": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "range": [ + 288, + 307 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + ], + "comments": [], + "range": [ + 0, + 308 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/quoted-unicode-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/quoted-unicode-value.json new file mode 100644 index 0000000..60bc26f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/quoted-unicode-value.json @@ -0,0 +1,6 @@ +{ + "escaped_string": "\u0000 \b \f A  € ÿ ퟿  ￿ 𐀀 􏿿", + "not_escaped_string": "\\u0000 \\u0008 \\u000c \\U00000041 \\u007f \\u0080 \\u00ff \\ud7ff \\ue000 \\uffff \\U00010000 \\U0010ffff", + "basic_string": "~ € ÿ ퟿  ￿ 𐀀 􏿿", + "literal_string": "~ € ÿ ퟿  ￿ 𐀀 􏿿" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-multiline-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-multiline-output.json new file mode 100644 index 0000000..b45aac4 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-multiline-output.json @@ -0,0 +1,765 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "oneline", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "This string has a ' quote character.", + "style": "literal", + "multiline": true, + "range": [ + 40, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "range": [ + 30, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "firstnl", + "range": [ + 157, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + } + ], + "range": [ + 157, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "This string has a ' quote character.", + "style": "literal", + "multiline": true, + "range": [ + 167, + 210 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 157, + 210 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multiline", + "range": [ + 273, + 282 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + ], + "range": [ + 273, + 282 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "This string\nhas ' a quote character\nand more than\none newline\nin it.", + "style": "literal", + "multiline": true, + "range": [ + 285, + 360 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 273, + 360 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "multiline_with_tab", + "range": [ + 424, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 18 + } + } + } + ], + "range": [ + 424, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "First line\n\t Followed by a tab", + "style": "literal", + "multiline": true, + "range": [ + 445, + 481 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 18, + "column": 22 + } + } + }, + "range": [ + 424, + 481 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 18, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "this-str-has-apostrophes", + "range": [ + 483, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 24 + } + } + } + ], + "range": [ + 483, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 24 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "' there's one already\n'' two more\n''", + "style": "literal", + "multiline": true, + "range": [ + 508, + 550 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 22, + "column": 5 + } + } + }, + "range": [ + 483, + 550 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 22, + "column": 5 + } + } + } + ], + "range": [ + 30, + 550 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 22, + "column": 5 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "oneline", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''This string has a ' quote character.'''", + "string": "This string has a ' quote character.", + "range": [ + 40, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + { + "type": "Bare", + "value": "firstnl", + "range": [ + 157, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''\nThis string has a ' quote character.'''", + "string": "This string has a ' quote character.", + "range": [ + 167, + 210 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + { + "type": "Bare", + "value": "multiline", + "range": [ + 273, + 282 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 283, + 284 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''\nThis string\nhas ' a quote character\nand more than\none newline\nin it.'''", + "string": "This string\nhas ' a quote character\nand more than\none newline\nin it.", + "range": [ + 285, + 360 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "multiline_with_tab", + "range": [ + 424, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 443, + 444 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''First line\n\t Followed by a tab'''", + "string": "First line\n\t Followed by a tab", + "range": [ + 445, + 481 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 18, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "this-str-has-apostrophes", + "range": [ + 483, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 507, + 508 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 25 + } + } + }, + { + "type": "MultiLineLiteralString", + "value": "'''' there's one already\n'' two more\n'''''", + "string": "' there's one already\n'' two more\n''", + "range": [ + 508, + 550 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 22, + "column": 5 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " Single ' should be allowed.", + "range": [ + 0, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": "Block", + "value": " A newline immediately following the opening delimiter will be trimmed.", + "range": [ + 84, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 72 + } + } + }, + { + "type": "Block", + "value": " All other whitespace and newline characters remain intact.", + "range": [ + 212, + 272 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 60 + } + } + }, + { + "type": "Block", + "value": " Tab character in literal string does not need to be escaped", + "range": [ + 362, + 423 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 61 + } + } + } + ], + "range": [ + 0, + 551 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-multiline-string-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-multiline-value.json similarity index 52% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-multiline-string-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-multiline-value.json index c804891..ddb1f7d 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-multiline-string-value.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-multiline-value.json @@ -1,5 +1,7 @@ { "oneline": "This string has a ' quote character.", "firstnl": "This string has a ' quote character.", - "multiline": "This string\nhas ' a quote character\nand more than\none newline\nin it." + "multiline": "This string\nhas ' a quote character\nand more than\none newline\nin it.", + "multiline_with_tab": "First line\n\t Followed by a tab", + "this-str-has-apostrophes": "' there's one already\n'' two more\n''" } \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-string-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-output.json similarity index 82% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-string-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-output.json index b5f06e0..72147f1 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-string-output.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-output.json @@ -161,10 +161,10 @@ "keys": [ { "type": "TOMLBare", - "name": "newline", + "name": "unescaped_tab", "range": [ 100, - 107 + 113 ], "loc": { "start": { @@ -173,14 +173,14 @@ }, "end": { "line": 3, - "column": 7 + "column": 13 } } } ], "range": [ 100, - 107 + 113 ], "loc": { "start": { @@ -189,34 +189,34 @@ }, "end": { "line": 3, - "column": 7 + "column": 13 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a \\n new line character.", + "value": "This string has an \t unescaped tab character.", "style": "literal", "multiline": false, "range": [ - 110, - 152 + 116, + 163 ], "loc": { "start": { "line": 3, - "column": 10 + "column": 16 }, "end": { "line": 3, - "column": 52 + "column": 63 } } }, "range": [ 100, - 152 + 163 ], "loc": { "start": { @@ -225,7 +225,7 @@ }, "end": { "line": 3, - "column": 52 + "column": 63 } } }, @@ -236,10 +236,10 @@ "keys": [ { "type": "TOMLBare", - "name": "formfeed", + "name": "newline", "range": [ - 153, - 161 + 164, + 171 ], "loc": { "start": { @@ -248,14 +248,14 @@ }, "end": { "line": 4, - "column": 8 + "column": 7 } } } ], "range": [ - 153, - 161 + 164, + 171 ], "loc": { "start": { @@ -264,34 +264,34 @@ }, "end": { "line": 4, - "column": 8 + "column": 7 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a \\f form feed character.", + "value": "This string has a \\n new line character.", "style": "literal", "multiline": false, "range": [ - 164, - 207 + 174, + 216 ], "loc": { "start": { "line": 4, - "column": 11 + "column": 10 }, "end": { "line": 4, - "column": 54 + "column": 52 } } }, "range": [ - 153, - 207 + 164, + 216 ], "loc": { "start": { @@ -300,7 +300,7 @@ }, "end": { "line": 4, - "column": 54 + "column": 52 } } }, @@ -311,10 +311,10 @@ "keys": [ { "type": "TOMLBare", - "name": "carriage", + "name": "formfeed", "range": [ - 208, - 216 + 217, + 225 ], "loc": { "start": { @@ -329,8 +329,8 @@ } ], "range": [ - 208, - 216 + 217, + 225 ], "loc": { "start": { @@ -346,12 +346,12 @@ "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a \\r carriage return character.", + "value": "This string has a \\f form feed character.", "style": "literal", "multiline": false, "range": [ - 219, - 268 + 228, + 271 ], "loc": { "start": { @@ -360,13 +360,13 @@ }, "end": { "line": 5, - "column": 60 + "column": 54 } } }, "range": [ - 208, - 268 + 217, + 271 ], "loc": { "start": { @@ -375,7 +375,7 @@ }, "end": { "line": 5, - "column": 60 + "column": 54 } } }, @@ -386,10 +386,10 @@ "keys": [ { "type": "TOMLBare", - "name": "slash", + "name": "carriage", "range": [ - 269, - 274 + 272, + 280 ], "loc": { "start": { @@ -398,14 +398,14 @@ }, "end": { "line": 6, - "column": 5 + "column": 8 } } } ], "range": [ - 269, - 274 + 272, + 280 ], "loc": { "start": { @@ -414,34 +414,34 @@ }, "end": { "line": 6, - "column": 5 + "column": 8 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a \\/ slash character.", + "value": "This string has a \\r carriage return character.", "style": "literal", "multiline": false, "range": [ - 277, - 316 + 283, + 332 ], "loc": { "start": { "line": 6, - "column": 8 + "column": 11 }, "end": { "line": 6, - "column": 47 + "column": 60 } } }, "range": [ - 269, - 316 + 272, + 332 ], "loc": { "start": { @@ -450,7 +450,7 @@ }, "end": { "line": 6, - "column": 47 + "column": 60 } } }, @@ -461,10 +461,10 @@ "keys": [ { "type": "TOMLBare", - "name": "backslash", + "name": "slash", "range": [ - 317, - 326 + 333, + 338 ], "loc": { "start": { @@ -473,14 +473,14 @@ }, "end": { "line": 7, - "column": 9 + "column": 5 } } } ], "range": [ - 317, - 326 + 333, + 338 ], "loc": { "start": { @@ -489,34 +489,34 @@ }, "end": { "line": 7, - "column": 9 + "column": 5 } } }, "value": { "type": "TOMLValue", "kind": "string", - "value": "This string has a \\\\ backslash character.", + "value": "This string has a \\/ slash character.", "style": "literal", "multiline": false, "range": [ - 329, - 372 + 341, + 380 ], "loc": { "start": { "line": 7, - "column": 12 + "column": 8 }, "end": { "line": 7, - "column": 55 + "column": 47 } } }, "range": [ - 317, - 372 + 333, + 380 ], "loc": { "start": { @@ -525,6 +525,81 @@ }, "end": { "line": 7, + "column": 47 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "backslash", + "range": [ + 381, + 390 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "range": [ + 381, + 390 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "This string has a \\\\ backslash character.", + "style": "literal", + "multiline": false, + "range": [ + 393, + 436 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 55 + } + } + }, + "range": [ + 381, + 436 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, "column": 55 } } @@ -532,7 +607,7 @@ ], "range": [ 0, - 372 + 436 ], "loc": { "start": { @@ -540,7 +615,7 @@ "column": 0 }, "end": { - "line": 7, + "line": 8, "column": 55 } } @@ -660,10 +735,10 @@ }, { "type": "Bare", - "value": "newline", + "value": "unescaped_tab", "range": [ 100, - 107 + 113 ], "loc": { "start": { @@ -672,7 +747,7 @@ }, "end": { "line": 3, - "column": 7 + "column": 13 } } }, @@ -680,16 +755,71 @@ "type": "Punctuator", "value": "=", "range": [ - 108, - 109 + 114, + 115 ], "loc": { "start": { "line": 3, - "column": 8 + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "LiteralString", + "value": "'This string has an \t unescaped tab character.'", + "string": "This string has an \t unescaped tab character.", + "range": [ + 116, + 163 + ], + "loc": { + "start": { + "line": 3, + "column": 16 }, "end": { "line": 3, + "column": 63 + } + } + }, + { + "type": "Bare", + "value": "newline", + "range": [ + 164, + 171 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, "column": 9 } } @@ -699,16 +829,16 @@ "value": "'This string has a \\n new line character.'", "string": "This string has a \\n new line character.", "range": [ - 110, - 152 + 174, + 216 ], "loc": { "start": { - "line": 3, + "line": 4, "column": 10 }, "end": { - "line": 3, + "line": 4, "column": 52 } } @@ -717,16 +847,16 @@ "type": "Bare", "value": "formfeed", "range": [ - 153, - 161 + 217, + 225 ], "loc": { "start": { - "line": 4, + "line": 5, "column": 0 }, "end": { - "line": 4, + "line": 5, "column": 8 } } @@ -735,16 +865,16 @@ "type": "Punctuator", "value": "=", "range": [ - 162, - 163 + 226, + 227 ], "loc": { "start": { - "line": 4, + "line": 5, "column": 9 }, "end": { - "line": 4, + "line": 5, "column": 10 } } @@ -754,16 +884,16 @@ "value": "'This string has a \\f form feed character.'", "string": "This string has a \\f form feed character.", "range": [ - 164, - 207 + 228, + 271 ], "loc": { "start": { - "line": 4, + "line": 5, "column": 11 }, "end": { - "line": 4, + "line": 5, "column": 54 } } @@ -772,16 +902,16 @@ "type": "Bare", "value": "carriage", "range": [ - 208, - 216 + 272, + 280 ], "loc": { "start": { - "line": 5, + "line": 6, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 8 } } @@ -790,16 +920,16 @@ "type": "Punctuator", "value": "=", "range": [ - 217, - 218 + 281, + 282 ], "loc": { "start": { - "line": 5, + "line": 6, "column": 9 }, "end": { - "line": 5, + "line": 6, "column": 10 } } @@ -809,16 +939,16 @@ "value": "'This string has a \\r carriage return character.'", "string": "This string has a \\r carriage return character.", "range": [ - 219, - 268 + 283, + 332 ], "loc": { "start": { - "line": 5, + "line": 6, "column": 11 }, "end": { - "line": 5, + "line": 6, "column": 60 } } @@ -827,16 +957,16 @@ "type": "Bare", "value": "slash", "range": [ - 269, - 274 + 333, + 338 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 0 }, "end": { - "line": 6, + "line": 7, "column": 5 } } @@ -845,16 +975,16 @@ "type": "Punctuator", "value": "=", "range": [ - 275, - 276 + 339, + 340 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 6 }, "end": { - "line": 6, + "line": 7, "column": 7 } } @@ -864,16 +994,16 @@ "value": "'This string has a \\/ slash character.'", "string": "This string has a \\/ slash character.", "range": [ - 277, - 316 + 341, + 380 ], "loc": { "start": { - "line": 6, + "line": 7, "column": 8 }, "end": { - "line": 6, + "line": 7, "column": 47 } } @@ -882,16 +1012,16 @@ "type": "Bare", "value": "backslash", "range": [ - 317, - 326 + 381, + 390 ], "loc": { "start": { - "line": 7, + "line": 8, "column": 0 }, "end": { - "line": 7, + "line": 8, "column": 9 } } @@ -900,16 +1030,16 @@ "type": "Punctuator", "value": "=", "range": [ - 327, - 328 + 391, + 392 ], "loc": { "start": { - "line": 7, + "line": 8, "column": 10 }, "end": { - "line": 7, + "line": 8, "column": 11 } } @@ -919,16 +1049,16 @@ "value": "'This string has a \\\\ backslash character.'", "string": "This string has a \\\\ backslash character.", "range": [ - 329, - 372 + 393, + 436 ], "loc": { "start": { - "line": 7, + "line": 8, "column": 12 }, "end": { - "line": 7, + "line": 8, "column": 55 } } @@ -937,7 +1067,7 @@ "comments": [], "range": [ 0, - 373 + 437 ], "loc": { "start": { @@ -945,7 +1075,7 @@ "column": 0 }, "end": { - "line": 8, + "line": 9, "column": 0 } } diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-string-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-value.json similarity index 85% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-string-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-value.json index f669a6c..3677078 100644 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/raw-string-value.json +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/raw-value.json @@ -1,6 +1,7 @@ { "backspace": "This string has a \\b backspace character.", "tab": "This string has a \\t tab character.", + "unescaped_tab": "This string has an \t unescaped tab character.", "newline": "This string has a \\n new line character.", "formfeed": "This string has a \\f form feed character.", "carriage": "This string has a \\r carriage return character.", diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-simple-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/simple-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-simple-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/simple-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-simple-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/simple-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-simple-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/simple-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-escape-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-escape-output.json new file mode 100644 index 0000000..c5271c3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-escape-output.json @@ -0,0 +1,1862 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "delta-1", + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "δ", + "style": "basic", + "multiline": false, + "range": [ + 10, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "delta-2", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "δ", + "style": "basic", + "multiline": false, + "range": [ + 29, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 19, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + } + ], + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": false, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 42, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "b", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + } + ], + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "b", + "style": "basic", + "multiline": false, + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [ + 61, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "c", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "c", + "style": "basic", + "multiline": false, + "range": [ + 90, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 80, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "null-1", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + ], + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\u0000", + "style": "basic", + "multiline": false, + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 103, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "null-2", + "range": [ + 122, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + } + ], + "range": [ + 122, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\u0000", + "style": "basic", + "multiline": false, + "range": [ + 132, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "range": [ + 122, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-delta-1", + "range": [ + 146, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + } + } + ], + "range": [ + 146, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "δ", + "style": "basic", + "multiline": true, + "range": [ + 159, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "range": [ + 146, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-delta-2", + "range": [ + 172, + 182 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 10 + } + } + } + ], + "range": [ + 172, + 182 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "δ", + "style": "basic", + "multiline": true, + "range": [ + 185, + 201 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "range": [ + 172, + 201 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-a", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "a", + "style": "basic", + "multiline": true, + "range": [ + 215, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "range": [ + 202, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-b", + "range": [ + 228, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 228, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "b", + "style": "basic", + "multiline": true, + "range": [ + 241, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "range": [ + 228, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-c", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 4 + } + } + } + ], + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "c", + "style": "basic", + "multiline": true, + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "range": [ + 254, + 283 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-null-1", + "range": [ + 284, + 293 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "range": [ + 284, + 293 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\u0000", + "style": "basic", + "multiline": true, + "range": [ + 297, + 309 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "range": [ + 284, + 309 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "ml-null-2", + "range": [ + 310, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + } + ], + "range": [ + 310, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "\u0000", + "style": "basic", + "multiline": true, + "range": [ + 323, + 339 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 29 + } + } + }, + "range": [ + 310, + 339 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 29 + } + } + } + ], + "range": [ + 0, + 339 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 29 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Bare", + "value": "delta-1", + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u03B4\"", + "string": "δ", + "range": [ + 10, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "delta-2", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\U000003B4\"", + "string": "δ", + "range": [ + 29, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u0061\"", + "string": "a", + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u0062\"", + "string": "b", + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\U00000063\"", + "string": "c", + "range": [ + 90, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "null-1", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\u0000\"", + "string": "\u0000", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Bare", + "value": "null-2", + "range": [ + 122, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "BasicString", + "value": "\"\\U00000000\"", + "string": "\u0000", + "range": [ + 132, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "Bare", + "value": "ml-delta-1", + "range": [ + 146, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 157, + 158 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\u03B4\"\"\"", + "string": "δ", + "range": [ + 159, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "ml-delta-2", + "range": [ + 172, + 182 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 183, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\U000003B4\"\"\"", + "string": "δ", + "range": [ + 185, + 201 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "Bare", + "value": "ml-a", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\u0061\"\"\"", + "string": "a", + "range": [ + 215, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "ml-b", + "range": [ + 228, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 239, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\u0062\"\"\"", + "string": "b", + "range": [ + 241, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "ml-c", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\U00000063\"\"\"", + "string": "c", + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + { + "type": "Bare", + "value": "ml-null-1", + "range": [ + 284, + 293 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 295, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\u0000\"\"\"", + "string": "\u0000", + "range": [ + 297, + 309 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": "Bare", + "value": "ml-null-2", + "range": [ + 310, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 321, + 322 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + { + "type": "MultiLineBasicString", + "value": "\"\"\"\\U00000000\"\"\"", + "string": "\u0000", + "range": [ + 323, + 339 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 29 + } + } + } + ], + "comments": [], + "range": [ + 0, + 340 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-escape-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-escape-value.json new file mode 100644 index 0000000..82875ee --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-escape-value.json @@ -0,0 +1,16 @@ +{ + "delta-1": "δ", + "delta-2": "δ", + "a": "a", + "b": "b", + "c": "c", + "null-1": "\u0000", + "null-2": "\u0000", + "ml-delta-1": "δ", + "ml-delta-2": "δ", + "ml-a": "a", + "ml-b": "b", + "ml-c": "c", + "ml-null-1": "\u0000", + "ml-null-2": "\u0000" +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-literal-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-literal-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-literal-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-literal-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-literal-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-literal-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-literal-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/unicode-literal-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-with-pound-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/with-pound-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-with-pound-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/with-pound-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-with-pound-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/with-pound-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string-with-pound-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/string/with-pound-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-and-explicit-after-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-and-explicit-after-output.json new file mode 100644 index 0000000..54c52d2 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-and-explicit-after-output.json @@ -0,0 +1,620 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 2, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "resolvedKey": [ + "a", + "b", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + } + ], + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 0, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + } + ], + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + "resolvedKey": [ + "a" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "y", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 15, + 24 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 0, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "y", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "comments": [], + "range": [ + 0, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-and-explicit-after-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-and-explicit-after-value.json new file mode 100644 index 0000000..5033b17 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-and-explicit-after-value.json @@ -0,0 +1,10 @@ +{ + "a": { + "b": [ + { + "x": 1 + } + ], + "y": 2 + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-implicit-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-implicit-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-implicit-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-implicit-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-implicit-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-many-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-many-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-many-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-many-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-many-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-many-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-many-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-many-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-nest-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-nest-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-nest-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-nest-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-nest-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-nest-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-nest-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-nest-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-one-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-one-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-one-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-one-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-one-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-one-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-one-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-one-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-table-array-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-table-array-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-table-array-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-table-array-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-table-array-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-table-array-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-array-table-array-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-table-array-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-within-dotted-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-within-dotted-output.json new file mode 100644 index 0000000..a01f33f --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-within-dotted-output.json @@ -0,0 +1,730 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "resolvedKey": [ + "fruit" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "color", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "range": [ + 8, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "string", + "value": "red", + "style": "basic", + "multiline": false, + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 8, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "range": [ + 0, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "TOMLTable", + "kind": "array", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "fruit", + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "TOMLBare", + "name": "apple", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "TOMLBare", + "name": "seeds", + "range": [ + 43, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "range": [ + 31, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "resolvedKey": [ + "fruit", + "apple", + "seeds", + 0 + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "size", + "range": [ + 51, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + } + ], + "range": [ + 51, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "range": [ + 51, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "range": [ + 29, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "range": [ + 0, + 59 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 8, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "color", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "BasicString", + "value": "\"red\"", + "string": "red", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "Bare", + "value": "fruit", + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Bare", + "value": "apple", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "Bare", + "value": "seeds", + "range": [ + 43, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Bare", + "value": "size", + "range": [ + 51, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "comments": [], + "range": [ + 0, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-within-dotted-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-within-dotted-value.json new file mode 100644 index 0000000..c96aa56 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/array-within-dotted-value.json @@ -0,0 +1,12 @@ +{ + "fruit": { + "apple": { + "color": "red", + "seeds": [ + { + "size": 2 + } + ] + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-name-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-name-output.json new file mode 100644 index 0000000..0d3014d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-name-output.json @@ -0,0 +1,893 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "literal", + "multiline": false, + "range": [ + 1, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 3 + } + } + } + ], + "range": [ + 1, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + "resolvedKey": [ + "" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + } + ], + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "range": [ + 5, + 10 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + } + ], + "range": [ + 0, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "basic", + "multiline": false, + "range": [ + 13, + 15 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "a", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + } + ], + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "resolvedKey": [ + "", + "a" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + } + ], + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 12, + 24 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "", + "style": "literal", + "multiline": false, + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "resolvedKey": [ + "a", + "" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "range": [ + 26, + 38 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "range": [ + 0, + 38 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "LiteralString", + "value": "''", + "string": "", + "range": [ + 1, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "BasicString", + "value": "\"\"", + "string": "", + "range": [ + 13, + 15 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "LiteralString", + "value": "''", + "string": "", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + } + } + ], + "comments": [], + "range": [ + 0, + 39 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-name-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-name-value.json new file mode 100644 index 0000000..d624ce3 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-name-value.json @@ -0,0 +1,13 @@ +{ + "": { + "x": 1, + "a": { + "x": 2 + } + }, + "a": { + "": { + "x": 3 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-empty-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/empty-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/keyword-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/keyword-output.json new file mode 100644 index 0000000..a6b9158 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/keyword-output.json @@ -0,0 +1,494 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "true", + "range": [ + 1, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ], + "range": [ + 1, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + "resolvedKey": [ + "true" + ], + "body": [], + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "false", + "range": [ + 9, + 14 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "range": [ + 9, + 14 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "resolvedKey": [ + "false" + ], + "body": [], + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "inf", + "range": [ + 18, + 21 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + } + ], + "range": [ + 18, + 21 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "resolvedKey": [ + "inf" + ], + "body": [], + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "nan", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + } + ], + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "resolvedKey": [ + "nan" + ], + "body": [], + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "range": [ + 0, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "true", + "range": [ + 1, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "false", + "range": [ + 9, + 14 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "inf", + "range": [ + 18, + 21 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "nan", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "comments": [], + "range": [ + 0, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/keyword-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/keyword-value.json new file mode 100644 index 0000000..18c75cf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/keyword-value.json @@ -0,0 +1,6 @@ +{ + "true": {}, + "false": {}, + "inf": {}, + "nan": {} +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/names-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/names-output.json new file mode 100644 index 0000000..964ec7d --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/names-output.json @@ -0,0 +1,1681 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "b", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "c", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "resolvedKey": [ + "a", + "b", + "c" + ], + "body": [], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "b.c", + "style": "basic", + "multiline": false, + "range": [ + 11, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "range": [ + 9, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "resolvedKey": [ + "a", + "b.c" + ], + "body": [], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "d.e", + "style": "literal", + "multiline": false, + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "resolvedKey": [ + "a", + "d.e" + ], + "body": [], + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": " x ", + "style": "literal", + "multiline": false, + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "range": [ + 29, + 36 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "resolvedKey": [ + "a", + " x " + ], + "body": [], + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "d", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "e", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "TOMLBare", + "name": "f", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + } + ], + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "resolvedKey": [ + "d", + "e", + "f" + ], + "body": [], + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "g", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "TOMLBare", + "name": "h", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "TOMLBare", + "name": "i", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "resolvedKey": [ + "g", + "h", + "i" + ], + "body": [], + "range": [ + 48, + 61 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "j", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "ʞ", + "style": "basic", + "multiline": false, + "range": [ + 68, + 71 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "TOMLQuoted", + "kind": "string", + "value": "l", + "style": "literal", + "multiline": false, + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + ], + "range": [ + 64, + 77 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "resolvedKey": [ + "j", + "ʞ", + "l" + ], + "body": [], + "range": [ + 62, + 79 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "x", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "1", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "TOMLBare", + "name": "2", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + } + ], + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "resolvedKey": [ + "x", + "1", + "2" + ], + "body": [], + "range": [ + 81, + 88 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "range": [ + 0, + 88 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "b", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 4, + 5 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "c", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "BasicString", + "value": "\"b.c\"", + "string": "b.c", + "range": [ + 11, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + } + }, + { + "type": "LiteralString", + "value": "'d.e'", + "string": "d.e", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "LiteralString", + "value": "' x '", + "string": " x ", + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "d", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Bare", + "value": "e", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Bare", + "value": "f", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "g", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "h", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Bare", + "value": "i", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "j", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "BasicString", + "value": "\"ʞ\"", + "string": "ʞ", + "range": [ + 68, + 71 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "LiteralString", + "value": "'l'", + "string": "l", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "x", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "1", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Bare", + "value": "2", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "comments": [], + "range": [ + 0, + 89 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/names-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/names-value.json new file mode 100644 index 0000000..a392ec5 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/names-value.json @@ -0,0 +1,30 @@ +{ + "a": { + "b": { + "c": {} + }, + "b.c": {}, + "d.e": {}, + " x ": {} + }, + "d": { + "e": { + "f": {} + } + }, + "g": { + "h": { + "i": {} + } + }, + "j": { + "ʞ": { + "l": {} + } + }, + "x": { + "1": { + "2": {} + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/no-eol-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/no-eol-output.json new file mode 100644 index 0000000..53f0ecf --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/no-eol-output.json @@ -0,0 +1,155 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "table", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "resolvedKey": [ + "table" + ], + "body": [], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "range": [ + 0, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "table", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ], + "comments": [], + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/no-eol-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/no-eol-value.json new file mode 100644 index 0000000..a36d223 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/no-eol-value.json @@ -0,0 +1,3 @@ +{ + "table": {} +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-sub-empty-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-empty-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-sub-empty-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-empty-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-sub-empty-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-empty-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-sub-empty-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-empty-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-output.json new file mode 100644 index 0000000..bb3caa9 --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-output.json @@ -0,0 +1,955 @@ +{ + "type": "Program", + "body": [ + { + "type": "TOMLTopLevelTable", + "body": [ + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + } + ], + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + "resolvedKey": [ + "a" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key", + "range": [ + 4, + 7 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + } + ], + "range": [ + 4, + 7 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 1, + "number": "1", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "range": [ + 4, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "range": [ + 0, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "extend", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + ], + "range": [ + 56, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "resolvedKey": [ + "a", + "extend" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + } + ], + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 2, + "number": "2", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "range": [ + 66, + 73 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 7 + } + } + } + ], + "range": [ + 55, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "TOMLTable", + "kind": "standard", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "a", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "TOMLBare", + "name": "extend", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "TOMLBare", + "name": "more", + "range": [ + 85, + 89 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 14 + } + } + } + ], + "range": [ + 76, + 89 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + "resolvedKey": [ + "a", + "extend", + "more" + ], + "body": [ + { + "type": "TOMLKeyValue", + "key": { + "type": "TOMLKey", + "keys": [ + { + "type": "TOMLBare", + "name": "key", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + ], + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "value": { + "type": "TOMLValue", + "kind": "integer", + "value": 3, + "number": "3", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "range": [ + 91, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "range": [ + 75, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "range": [ + 0, + 98 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 2, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "key", + "range": [ + 4, + 7 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "1", + "number": 1, + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "extend", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "key", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "2", + "number": 2, + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Bare", + "value": "a", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + { + "type": "Bare", + "value": "extend", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "Bare", + "value": "more", + "range": [ + 85, + 89 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Bare", + "value": "key", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Integer", + "value": "3", + "number": 3, + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "comments": [ + { + "type": "Block", + "value": " a.extend is a key inside the \"a\" table.", + "range": [ + 13, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 0, + 99 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-value.json new file mode 100644 index 0000000..6a6ad9e --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/sub-value.json @@ -0,0 +1,11 @@ +{ + "a": { + "key": 1, + "extend": { + "key": 2, + "more": { + "key": 3 + } + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-whitespace-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/whitespace-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-whitespace-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/whitespace-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-whitespace-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/whitespace-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-whitespace-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/whitespace-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-literal-string-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-literal-string-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-literal-string-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-literal-string-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-literal-string-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-literal-string-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-literal-string-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-literal-string-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-pound-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-pound-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-pound-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-pound-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-pound-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-pound-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-pound-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-pound-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-single-quotes-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-single-quotes-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-single-quotes-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-single-quotes-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-single-quotes-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-single-quotes-value.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-with-single-quotes-value.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/with-single-quotes-value.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-without-super-output.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/without-super-output.json similarity index 100% rename from tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table-without-super-output.json rename to tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/without-super-output.json diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/without-super-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/without-super-value.json new file mode 100644 index 0000000..989a18b --- /dev/null +++ b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/table/without-super-value.json @@ -0,0 +1,9 @@ +{ + "x": { + "y": { + "z": { + "w": {} + } + } + } +} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-float-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-float-value.json deleted file mode 100644 index b61f490..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-float-value.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "electron_mass": 9.109109383e-31 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-integer-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-integer-value.json deleted file mode 100644 index 35cdc1f..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/underscored-integer-value.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "million": 1000000 -} \ No newline at end of file diff --git a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-escape-value.json b/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-escape-value.json deleted file mode 100644 index af1a0fc..0000000 --- a/tests/fixtures/test-specs/out/BurntSushi-toml-test/tests/valid/unicode-escape-value.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "answer4": "δ", - "answer8": "δ" -} \ No newline at end of file diff --git a/tests/src/parser/parser.ts b/tests/src/parser/parser.ts index 8a78ff8..fb1bcad 100644 --- a/tests/src/parser/parser.ts +++ b/tests/src/parser/parser.ts @@ -35,7 +35,7 @@ describe("Check for AST.", () => { try { ast = parse(input, inputFileName); - if (invalid) { + if (invalid && !input.includes("\ufffd")) { assert.fail("Expected error"); } } catch (e: any) { @@ -114,12 +114,25 @@ describe("Check for AST.", () => { "spec-date-local-1.toml", "spec-date-time-local-1.toml", "spec-date-time-local-2.toml", + "spec/table-7.toml", + "spec/local-time-0.toml", + "spec/local-date-time-0.toml", + "spec/local-date-0.toml", + "datetime/local.toml", + "datetime/local-date.toml", + "datetime/leap-year.toml", + "datetime/edge.toml", + "comment/everywhere.toml", // -0 // "spec-float-9.toml", // big int "long-integer.toml", "spec-int-max.toml", "spec-int-min.toml", + "integer/long.toml", + // newline + "control/rawmulti-cd.toml", + "control/multi-cr.toml", // cannot parse "local-time-sample01-input.toml", "sample08-dates-and-times-input.toml", @@ -127,6 +140,13 @@ describe("Check for AST.", () => { "time01-input.toml", "date-time02-fraction-input.toml", "leap-second01-input.toml", + // cannot parse + "string/multiline-escaped-crlf.toml", + "spec/local-time-0.toml", + "float/zero.toml", + "datetime/local-time.toml", + "datetime/datetime.toml", + "control/bare-cr.toml", ].includes(filename) ) { // There are known differences. diff --git a/tests/src/parser/utils.ts b/tests/src/parser/utils.ts index ae0c217..1d64b57 100644 --- a/tests/src/parser/utils.ts +++ b/tests/src/parser/utils.ts @@ -123,30 +123,48 @@ function* listUpBurntSushiTestSpecsFixtures(): Generator<{ }, ]; for (const rootDir of BURNTSUSHI_TESTS_ROOTS) { - for (const filename of fs - .readdirSync(rootDir.in) - .filter((f) => f.endsWith(".toml"))) { - const inputFileName = path.join(rootDir.in, filename); - const outputFileName = path.join( + for (const d of recursiveReaddirSync(rootDir.in)) { + if (!d.name.endsWith(".toml")) { + continue; + } + const inputFileName = path.join(d.path, d.name); + const filename = inputFileName.slice(rootDir.in.length + 1); + const outputDir = path.join( rootDir.out, - filename.replace(/\.toml$/u, "-output.json"), + path.relative(rootDir.in, d.path), + ); + const outputFileName = path.join( + outputDir, + d.name.replace(/\.toml$/u, "-output.json"), ); const valueFileName = path.join( - rootDir.out, - filename.replace(/\.toml$/u, "-value.json"), + outputDir, + d.name.replace(/\.toml$/u, "-value.json"), ); + const isTOML11OnlySpec = [ + // Spec for TOML 1.1 + "string/hex-escape.toml", + "string/escape-esc.toml", + "key/unicode.toml", + "inline-table/newline.toml", + "datetime/no-seconds.toml", + ].includes(filename); + + const hasCR = [ + "control/bare-cr.toml", + "control/multi-cr.toml", + "control/rawmulti-cd.toml", + ].includes(filename); + let specAssertion: SpecAssertion | undefined; const schemaFileName = inputFileName.replace(/\.toml$/u, ".json"); if ( fs.existsSync(schemaFileName) && // ignores - ![ - // A value that cannot be expressed in JS. - "long-integer.toml", - "string-bad-codepoint.toml", - ].includes(filename) + !isTOML11OnlySpec && + !hasCR ) { const schema = JSON.parse(fs.readFileSync(schemaFileName, "utf8")); const expected = schemaToJson(schema); @@ -156,26 +174,37 @@ function* listUpBurntSushiTestSpecsFixtures(): Generator<{ }; } + const invalid = (rootDir.invalid && !hasCR) || isTOML11OnlySpec; + yield { filename, inputFileName, outputFileName, valueFileName, specAssertion, - valid: !rootDir.invalid, - invalid: - rootDir.invalid && - ![ - // It is valid in TOML v1.0 - "array-mixed-types-arrays-and-ints.toml", - "array-mixed-types-ints-and-floats.toml", - "array-mixed-types-strings-and-ints.toml", - ].includes(filename), + valid: !invalid, + invalid, }; } } } +function* recursiveReaddirSync(root: string): Iterable<{ + path: string; + name: string; +}> { + for (const dirent of fs.readdirSync(root, { withFileTypes: true })) { + if (dirent.isFile()) { + yield { + path: root, + name: dirent.name, + }; + } else if (dirent.isDirectory()) { + yield* recursiveReaddirSync(path.join(root, dirent.name)); + } + } +} + function* listUpIarnaTestSpecsFixtures(): Generator<{ filename: string; inputFileName: string; @@ -256,41 +285,62 @@ function* listUpIarnaTestSpecsFixtures(): Generator<{ } function schemaToJson(schema: any): any { - return replaceJSON(schema, (_key, value) => { - if (value && typeof value === "object") { - const keys = Object.keys(value); - if ( - keys.length === 2 && - keys.includes("type") && - keys.includes("value") - ) { - if (value.type === "integer" || value.type === "float") { - return Number(value.value); - } - if (value.type === "bool") { - return value.value === "true" - ? true - : value.value === "false" - ? false - : value.value; - } + return replaceJSON( + schema, + // eslint-disable-next-line complexity -- ignore + (_key, value) => { + if (value && typeof value === "object") { + const keys = Object.keys(value); if ( - value.type === "datetime" || - value.type === "datetime-local" || - value.type === "date" + keys.length === 2 && + keys.includes("type") && + keys.includes("value") ) { - return new Date(value.value); - } - if (value.type === "time") { - return new Date(`0000-01-01T${value.value}Z`); - } + if (value.type === "integer") { + return Number(value.value); + } + if (value.type === "float") { + if (value.value === "+inf" || value.value === "inf") { + return Infinity; + } + if (value.value === "-inf") { + return -Infinity; + } + if ( + value.value === "nan" || + value.value === "+nan" || + value.value === "-nan" + ) { + return NaN; + } + return Number(value.value); + } + if (value.type === "bool") { + return value.value === "true" + ? true + : value.value === "false" + ? false + : value.value; + } + if ( + value.type === "datetime" || + value.type === "datetime-local" || + value.type === "date" || + value.type === "date-local" + ) { + return new Date(value.value); + } + if (value.type === "time" || value.type === "time-local") { + return new Date(`0000-01-01T${value.value}Z`); + } - return value.value; + return value.value; + } } - } - return value; - }); + return value; + }, + ); } /** Replace values */ diff --git a/tools/update-fixtures.ts b/tools/update-fixtures.ts index c30e6c8..946dca9 100644 --- a/tools/update-fixtures.ts +++ b/tools/update-fixtures.ts @@ -4,6 +4,7 @@ import { parseForESLint } from "../src/parser"; import { getStaticTOMLValue } from "../src/utils"; import type { TOMLProgram } from "../src/ast"; import { listUpFixtures, stringify } from "../tests/src/parser/utils"; +import path from "path"; /** * Parse @@ -23,17 +24,20 @@ for (const { const input = fs.readFileSync(inputFileName, "utf8"); let ast: TOMLProgram | null = null; + fs.mkdirSync(path.dirname(outputFileName), { recursive: true }); try { ast = parse(input, filename).ast; const astJson = stringify(ast, true); fs.writeFileSync(outputFileName, astJson, "utf8"); - } catch (e) { + } catch (e: any) { fs.writeFileSync( outputFileName, stringify(`${e.message}@line:${e.lineNumber},column:${e.column}`), "utf8", ); } - if (ast) + if (ast) { + fs.mkdirSync(path.dirname(valueFileName), { recursive: true }); fs.writeFileSync(valueFileName, stringify(getStaticTOMLValue(ast)), "utf8"); + } }