From fab343e379a51cb6d0bc84d743838c0827689ba9 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Wed, 22 Mar 2017 09:50:34 +1300 Subject: [PATCH] Add support for invalid escapes in tagged templates (#274) Per the stage-3 TC39 proposal: https://github.com/tc39/proposal-template-literal-revision --- README.md | 1 + ast/spec.md | 2 +- src/parser/expression.js | 19 +- src/tokenizer/index.js | 71 +++++-- src/tokenizer/state.js | 2 + .../core/uncategorised/499/options.json | 2 +- .../core/uncategorised/501/options.json | 2 +- .../core/uncategorised/503/options.json | 2 +- .../es2015/uncategorised/290/options.json | 2 +- .../es2015/uncategorised/339/options.json | 2 +- .../invalid-escape/options.json | 2 +- .../invalid-syntax/migrated_0216/options.json | 2 +- .../invalid-syntax/migrated_0217/options.json | 2 +- .../invalid-syntax/migrated_0219/options.json | 2 +- .../invalid-syntax/migrated_0221/options.json | 2 +- .../invalid-syntax/migrated_0222/options.json | 2 +- .../invalid-syntax/migrated_0223/options.json | 2 +- .../1/actual.js | 1 + .../1/expected.json | 119 +++++++++++ .../10/actual.js | 1 + .../10/expected.json | 160 ++++++++++++++ .../11/actual.js | 1 + .../11/expected.json | 160 ++++++++++++++ .../12/actual.js | 1 + .../12/expected.json | 200 ++++++++++++++++++ .../13/actual.js | 1 + .../13/expected.json | 119 +++++++++++ .../14/actual.js | 1 + .../14/expected.json | 160 ++++++++++++++ .../15/actual.js | 1 + .../15/expected.json | 160 ++++++++++++++ .../16/actual.js | 1 + .../16/expected.json | 200 ++++++++++++++++++ .../17/actual.js | 1 + .../17/expected.json | 119 +++++++++++ .../18/actual.js | 1 + .../18/expected.json | 160 ++++++++++++++ .../19/actual.js | 1 + .../19/expected.json | 160 ++++++++++++++ .../2/actual.js | 1 + .../2/expected.json | 160 ++++++++++++++ .../20/actual.js | 1 + .../20/expected.json | 200 ++++++++++++++++++ .../21/actual.js | 1 + .../21/expected.json | 119 +++++++++++ .../22/actual.js | 1 + .../22/expected.json | 160 ++++++++++++++ .../23/actual.js | 1 + .../23/expected.json | 160 ++++++++++++++ .../24/actual.js | 1 + .../24/expected.json | 200 ++++++++++++++++++ .../25/actual.js | 1 + .../25/expected.json | 119 +++++++++++ .../26/actual.js | 1 + .../26/expected.json | 160 ++++++++++++++ .../27/actual.js | 1 + .../27/expected.json | 160 ++++++++++++++ .../28/actual.js | 1 + .../28/expected.json | 200 ++++++++++++++++++ .../29/actual.js | 1 + .../29/expected.json | 119 +++++++++++ .../3/actual.js | 1 + .../3/expected.json | 160 ++++++++++++++ .../30/actual.js | 1 + .../30/expected.json | 160 ++++++++++++++ .../31/actual.js | 1 + .../31/expected.json | 160 ++++++++++++++ .../32/actual.js | 1 + .../32/expected.json | 200 ++++++++++++++++++ .../33/actual.js | 1 + .../33/expected.json | 119 +++++++++++ .../34/actual.js | 1 + .../34/expected.json | 160 ++++++++++++++ .../35/actual.js | 1 + .../35/expected.json | 160 ++++++++++++++ .../36/actual.js | 1 + .../36/expected.json | 200 ++++++++++++++++++ .../37/actual.js | 1 + .../37/expected.json | 119 +++++++++++ .../38/actual.js | 1 + .../38/expected.json | 160 ++++++++++++++ .../39/actual.js | 1 + .../39/expected.json | 160 ++++++++++++++ .../4/actual.js | 1 + .../4/expected.json | 200 ++++++++++++++++++ .../40/actual.js | 1 + .../40/expected.json | 200 ++++++++++++++++++ .../41/actual.js | 1 + .../41/expected.json | 119 +++++++++++ .../42/actual.js | 1 + .../42/expected.json | 160 ++++++++++++++ .../43/actual.js | 1 + .../43/expected.json | 160 ++++++++++++++ .../44/actual.js | 1 + .../44/expected.json | 200 ++++++++++++++++++ .../45/actual.js | 1 + .../45/expected.json | 119 +++++++++++ .../46/actual.js | 1 + .../46/expected.json | 160 ++++++++++++++ .../47/actual.js | 1 + .../47/expected.json | 160 ++++++++++++++ .../48/actual.js | 1 + .../48/expected.json | 200 ++++++++++++++++++ .../49/actual.js | 1 + .../49/expected.json | 119 +++++++++++ .../5/actual.js | 1 + .../5/expected.json | 119 +++++++++++ .../50/actual.js | 1 + .../50/expected.json | 160 ++++++++++++++ .../51/actual.js | 1 + .../51/expected.json | 160 ++++++++++++++ .../52/actual.js | 1 + .../52/expected.json | 200 ++++++++++++++++++ .../53/actual.js | 1 + .../53/expected.json | 119 +++++++++++ .../54/actual.js | 1 + .../54/expected.json | 160 ++++++++++++++ .../55/actual.js | 1 + .../55/expected.json | 160 ++++++++++++++ .../56/actual.js | 1 + .../56/expected.json | 200 ++++++++++++++++++ .../57/actual.js | 1 + .../57/expected.json | 119 +++++++++++ .../58/actual.js | 1 + .../58/expected.json | 160 ++++++++++++++ .../59/actual.js | 1 + .../59/expected.json | 160 ++++++++++++++ .../6/actual.js | 1 + .../6/expected.json | 160 ++++++++++++++ .../60/actual.js | 1 + .../60/expected.json | 200 ++++++++++++++++++ .../61/actual.js | 1 + .../61/expected.json | 119 +++++++++++ .../62/actual.js | 1 + .../62/expected.json | 160 ++++++++++++++ .../63/actual.js | 1 + .../63/expected.json | 160 ++++++++++++++ .../64/actual.js | 1 + .../64/expected.json | 200 ++++++++++++++++++ .../65/actual.js | 1 + .../65/expected.json | 119 +++++++++++ .../66/actual.js | 1 + .../66/expected.json | 160 ++++++++++++++ .../67/actual.js | 1 + .../67/expected.json | 160 ++++++++++++++ .../68/actual.js | 1 + .../68/expected.json | 200 ++++++++++++++++++ .../7/actual.js | 1 + .../7/expected.json | 160 ++++++++++++++ .../8/actual.js | 1 + .../8/expected.json | 200 ++++++++++++++++++ .../9/actual.js | 1 + .../9/expected.json | 119 +++++++++++ .../options.json | 3 + .../1/actual.js | 1 + .../1/options.json | 6 + .../10/actual.js | 1 + .../10/options.json | 6 + .../11/actual.js | 1 + .../11/options.json | 6 + .../12/actual.js | 1 + .../12/options.json | 6 + .../13/actual.js | 1 + .../13/options.json | 6 + .../14/actual.js | 1 + .../14/options.json | 6 + .../15/actual.js | 1 + .../15/options.json | 6 + .../16/actual.js | 1 + .../16/options.json | 6 + .../17/actual.js | 1 + .../17/options.json | 6 + .../18/actual.js | 1 + .../18/options.json | 6 + .../19/actual.js | 1 + .../19/options.json | 6 + .../2/actual.js | 1 + .../2/options.json | 6 + .../20/actual.js | 1 + .../20/options.json | 6 + .../21/actual.js | 1 + .../21/options.json | 6 + .../22/actual.js | 1 + .../22/options.json | 6 + .../23/actual.js | 1 + .../23/options.json | 6 + .../24/actual.js | 1 + .../24/options.json | 6 + .../25/actual.js | 1 + .../25/options.json | 6 + .../26/actual.js | 1 + .../26/options.json | 6 + .../27/actual.js | 1 + .../27/options.json | 6 + .../28/actual.js | 1 + .../28/options.json | 6 + .../29/actual.js | 1 + .../29/options.json | 6 + .../3/actual.js | 1 + .../3/options.json | 6 + .../30/actual.js | 1 + .../30/options.json | 6 + .../31/actual.js | 1 + .../31/options.json | 6 + .../32/actual.js | 1 + .../32/options.json | 6 + .../33/actual.js | 1 + .../33/options.json | 6 + .../34/actual.js | 1 + .../34/options.json | 6 + .../35/actual.js | 1 + .../35/options.json | 6 + .../36/actual.js | 1 + .../36/options.json | 6 + .../37/actual.js | 1 + .../37/options.json | 6 + .../38/actual.js | 1 + .../38/options.json | 6 + .../39/actual.js | 1 + .../39/options.json | 6 + .../4/actual.js | 1 + .../4/options.json | 6 + .../40/actual.js | 1 + .../40/options.json | 6 + .../41/actual.js | 1 + .../41/options.json | 6 + .../42/actual.js | 1 + .../42/options.json | 6 + .../43/actual.js | 1 + .../43/options.json | 6 + .../44/actual.js | 1 + .../44/options.json | 6 + .../45/actual.js | 1 + .../45/options.json | 6 + .../46/actual.js | 1 + .../46/options.json | 6 + .../47/actual.js | 1 + .../47/options.json | 6 + .../48/actual.js | 1 + .../48/options.json | 6 + .../49/actual.js | 1 + .../49/options.json | 6 + .../5/actual.js | 1 + .../5/options.json | 6 + .../50/actual.js | 1 + .../50/options.json | 6 + .../51/actual.js | 1 + .../51/options.json | 6 + .../52/actual.js | 1 + .../52/options.json | 6 + .../53/actual.js | 1 + .../53/options.json | 6 + .../54/actual.js | 1 + .../54/options.json | 6 + .../55/actual.js | 1 + .../55/options.json | 6 + .../56/actual.js | 1 + .../56/options.json | 6 + .../57/actual.js | 1 + .../57/options.json | 6 + .../58/actual.js | 1 + .../58/options.json | 6 + .../59/actual.js | 1 + .../59/options.json | 6 + .../6/actual.js | 1 + .../6/options.json | 6 + .../60/actual.js | 1 + .../60/options.json | 6 + .../61/actual.js | 1 + .../61/options.json | 6 + .../62/actual.js | 1 + .../62/options.json | 6 + .../63/actual.js | 1 + .../63/options.json | 6 + .../64/actual.js | 1 + .../64/options.json | 6 + .../65/actual.js | 1 + .../65/options.json | 6 + .../66/actual.js | 1 + .../66/options.json | 6 + .../67/actual.js | 1 + .../67/options.json | 6 + .../68/actual.js | 1 + .../68/options.json | 6 + .../7/actual.js | 1 + .../7/options.json | 6 + .../8/actual.js | 1 + .../8/options.json | 6 + .../9/actual.js | 1 + .../9/options.json | 6 + 290 files changed, 11491 insertions(+), 38 deletions(-) create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/expected.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-tagged/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/options.json create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/actual.js create mode 100644 test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/options.json diff --git a/README.md b/README.md index 6836b8f84e..ad2a8fd874 100644 --- a/README.md +++ b/README.md @@ -131,3 +131,4 @@ require("babylon").parse("code", { - `functionBind` - `functionSent` - `dynamicImport` + - `templateInvalidEscapes` diff --git a/ast/spec.md b/ast/spec.md index e3c5ec07b0..f06b1ebe99 100644 --- a/ast/spec.md +++ b/ast/spec.md @@ -959,7 +959,7 @@ interface TemplateElement <: Node { type: "TemplateElement"; tail: boolean; value: { - cooked: string; + cooked: string | null; raw: string; }; } diff --git a/src/parser/expression.js b/src/parser/expression.js index 6c6777f380..775d658f32 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -317,7 +317,7 @@ pp.parseSubscripts = function (base, startPos, startLoc, noCalls) { } else if (this.match(tt.backQuote)) { const node = this.startNodeAt(startPos, startLoc); node.tag = base; - node.quasi = this.parseTemplate(); + node.quasi = this.parseTemplate(true); base = this.finishNode(node, "TaggedTemplateExpression"); } else { return base; @@ -506,7 +506,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) { return this.parseNew(); case tt.backQuote: - return this.parseTemplate(); + return this.parseTemplate(false); case tt.doubleColon: node = this.startNode(); @@ -685,8 +685,15 @@ pp.parseNew = function () { // Parse template expression. -pp.parseTemplateElement = function () { +pp.parseTemplateElement = function (isTagged) { const elem = this.startNode(); + if (this.state.value === null) { + if (!isTagged || !this.hasPlugin("templateInvalidEscapes")) { + this.raise(this.state.invalidTemplateEscapePosition, "Invalid escape sequence in template"); + } else { + this.state.invalidTemplateEscapePosition = null; + } + } elem.value = { raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), cooked: this.state.value @@ -696,17 +703,17 @@ pp.parseTemplateElement = function () { return this.finishNode(elem, "TemplateElement"); }; -pp.parseTemplate = function () { +pp.parseTemplate = function (isTagged) { const node = this.startNode(); this.next(); node.expressions = []; - let curElt = this.parseTemplateElement(); + let curElt = this.parseTemplateElement(isTagged); node.quasis = [curElt]; while (!curElt.tail) { this.expect(tt.dollarBraceL); node.expressions.push(this.parseExpression()); this.expect(tt.braceR); - node.quasis.push(curElt = this.parseTemplateElement()); + node.quasis.push(curElt = this.parseTemplateElement(isTagged)); } this.next(); return this.finishNode(node, "TemplateLiteral"); diff --git a/src/tokenizer/index.js b/src/tokenizer/index.js index 4c35054c2b..a058ba91a5 100644 --- a/src/tokenizer/index.js +++ b/src/tokenizer/index.js @@ -599,17 +599,26 @@ export default class Tokenizer { // Read a string value, interpreting backslash-escapes. - readCodePoint() { + readCodePoint(throwOnInvalid) { const ch = this.input.charCodeAt(this.state.pos); let code; - if (ch === 123) { + if (ch === 123) { // '{' const codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos); + code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); ++this.state.pos; - if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds"); + if (code === null) { + --this.state.invalidTemplateEscapePosition; // to point to the '\'' instead of the 'u' + } else if (code > 0x10FFFF) { + if (throwOnInvalid) { + this.raise(codePos, "Code point out of bounds"); + } else { + this.state.invalidTemplateEscapePosition = codePos - 2; + return null; + } + } } else { - code = this.readHexChar(4); + code = this.readHexChar(4, throwOnInvalid); } return code; } @@ -636,7 +645,7 @@ export default class Tokenizer { // Reads template string tokens. readTmplToken() { - let out = "", chunkStart = this.state.pos; + let out = "", chunkStart = this.state.pos, containsInvalid = false; for (;;) { if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated template"); const ch = this.input.charCodeAt(this.state.pos); @@ -651,11 +660,16 @@ export default class Tokenizer { } } out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(tt.template, out); + return this.finishToken(tt.template, containsInvalid ? null : out); } if (ch === 92) { // '\' out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(true); + const escaped = this.readEscapedChar(true); + if (escaped === null) { + containsInvalid = true; + } else { + out += escaped; + } chunkStart = this.state.pos; } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.state.pos); @@ -682,13 +696,20 @@ export default class Tokenizer { // Used to read escaped characters readEscapedChar(inTemplate) { + const throwOnInvalid = !inTemplate; const ch = this.input.charCodeAt(++this.state.pos); ++this.state.pos; switch (ch) { case 110: return "\n"; // 'n' -> '\n' case 114: return "\r"; // 'r' -> '\r' - case 120: return String.fromCharCode(this.readHexChar(2)); // 'x' - case 117: return codePointToString(this.readCodePoint()); // 'u' + case 120: { // 'x' + const code = this.readHexChar(2, throwOnInvalid); + return code === null ? null : String.fromCharCode(code); + } + case 117: { // 'u' + const code = this.readCodePoint(throwOnInvalid); + return code === null ? null : codePointToString(code); + } case 116: return "\t"; // 't' -> '\t' case 98: return "\b"; // 'b' -> '\b' case 118: return "\u000b"; // 'v' -> '\u000b' @@ -700,6 +721,7 @@ export default class Tokenizer { return ""; default: if (ch >= 48 && ch <= 55) { + const codePos = this.state.pos - 1; let octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; let octal = parseInt(octalStr, 8); if (octal > 255) { @@ -707,12 +729,16 @@ export default class Tokenizer { octal = parseInt(octalStr, 8); } if (octal > 0) { - if (!this.state.containsOctal) { + if (inTemplate) { + this.state.invalidTemplateEscapePosition = codePos; + return null; + } else if (this.state.strict) { + this.raise(codePos, "Octal literal in strict mode"); + } else if (!this.state.containsOctal) { + // These properties are only used to throw an error for an octal which occurs + // in a directive which occurs prior to a "use strict" directive. this.state.containsOctal = true; - this.state.octalPosition = this.state.pos - 2; - } - if (this.state.strict || inTemplate) { - this.raise(this.state.pos - 2, "Octal literal in strict mode"); + this.state.octalPosition = codePos; } } this.state.pos += octalStr.length - 1; @@ -722,12 +748,19 @@ export default class Tokenizer { } } - // Used to read character escape sequences ('\x', '\u', '\U'). + // Used to read character escape sequences ('\x', '\u'). - readHexChar(len) { + readHexChar(len, throwOnInvalid) { const codePos = this.state.pos; const n = this.readInt(16, len); - if (n === null) this.raise(codePos, "Bad character escape sequence"); + if (n === null) { + if (throwOnInvalid) { + this.raise(codePos, "Bad character escape sequence"); + } else { + this.state.pos = codePos - 1; + this.state.invalidTemplateEscapePosition = codePos - 1; + } + } return n; } @@ -755,7 +788,7 @@ export default class Tokenizer { } ++this.state.pos; - const esc = this.readCodePoint(); + const esc = this.readCodePoint(true); if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) { this.raise(escStart, "Invalid Unicode escape"); } diff --git a/src/tokenizer/state.js b/src/tokenizer/state.js index 371bcdfd7d..2e35b3ac4f 100644 --- a/src/tokenizer/state.js +++ b/src/tokenizer/state.js @@ -50,6 +50,8 @@ export default class State { this.containsEsc = this.containsOctal = false; this.octalPosition = null; + this.invalidTemplateEscapePosition = null; + this.exportedIdentifiers = []; return this; diff --git a/test/fixtures/core/uncategorised/499/options.json b/test/fixtures/core/uncategorised/499/options.json index 68bfd75832..11a57d6c56 100644 --- a/test/fixtures/core/uncategorised/499/options.json +++ b/test/fixtures/core/uncategorised/499/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:34)" + "throws": "Octal literal in strict mode (1:35)" } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/501/options.json b/test/fixtures/core/uncategorised/501/options.json index fa3a33b55e..2984958689 100644 --- a/test/fixtures/core/uncategorised/501/options.json +++ b/test/fixtures/core/uncategorised/501/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:37)" + "throws": "Octal literal in strict mode (1:38)" } \ No newline at end of file diff --git a/test/fixtures/core/uncategorised/503/options.json b/test/fixtures/core/uncategorised/503/options.json index e689079a79..e92ad336dd 100644 --- a/test/fixtures/core/uncategorised/503/options.json +++ b/test/fixtures/core/uncategorised/503/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:68)" + "throws": "Octal literal in strict mode (1:69)" } \ No newline at end of file diff --git a/test/fixtures/es2015/uncategorised/290/options.json b/test/fixtures/es2015/uncategorised/290/options.json index 890fce8204..8513ff0bed 100644 --- a/test/fixtures/es2015/uncategorised/290/options.json +++ b/test/fixtures/es2015/uncategorised/290/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:22)" + "throws": "Invalid escape sequence in template (1:23)" } \ No newline at end of file diff --git a/test/fixtures/es2015/uncategorised/339/options.json b/test/fixtures/es2015/uncategorised/339/options.json index 857b44ba21..3ae5cb6c96 100644 --- a/test/fixtures/es2015/uncategorised/339/options.json +++ b/test/fixtures/es2015/uncategorised/339/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:1)" + "throws": "Invalid escape sequence in template (1:2)" } \ No newline at end of file diff --git a/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json b/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json index 857b44ba21..3ae5cb6c96 100644 --- a/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json +++ b/test/fixtures/esprima/es2015-template-literals/invalid-escape/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:1)" + "throws": "Invalid escape sequence in template (1:2)" } \ No newline at end of file diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json index 91bbdfe83f..61a5834b63 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0216/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:1)" + "throws": "Octal literal in strict mode (1:2)" } diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json index 68bfd75832..11a57d6c56 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0217/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:34)" + "throws": "Octal literal in strict mode (1:35)" } \ No newline at end of file diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json index fa3a33b55e..2984958689 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0219/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:37)" + "throws": "Octal literal in strict mode (1:38)" } \ No newline at end of file diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json index ae2bfab55c..d094fe0284 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0221/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:35)" + "throws": "Octal literal in strict mode (1:36)" } diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json index ae2bfab55c..d094fe0284 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0222/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:35)" + "throws": "Octal literal in strict mode (1:36)" } diff --git a/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json b/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json index e689079a79..e92ad336dd 100644 --- a/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json +++ b/test/fixtures/esprima/invalid-syntax/migrated_0223/options.json @@ -1,3 +1,3 @@ { - "throws": "Octal literal in strict mode (1:68)" + "throws": "Octal literal in strict mode (1:69)" } \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/actual.js new file mode 100644 index 0000000000..e62c7abcaf --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/actual.js @@ -0,0 +1 @@ +sampleTag`\01` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/expected.json new file mode 100644 index 0000000000..d8b75cc1d0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/1/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\01", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/actual.js new file mode 100644 index 0000000000..1b7671b74a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/actual.js @@ -0,0 +1 @@ +sampleTag`\xg${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/expected.json new file mode 100644 index 0000000000..6ef94ad9bd --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/10/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\xg", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 17, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/actual.js new file mode 100644 index 0000000000..87bfd46be5 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\xg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/expected.json new file mode 100644 index 0000000000..1cf6041972 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/11/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\xg", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/actual.js new file mode 100644 index 0000000000..eed8a8c9a1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\xg${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/expected.json new file mode 100644 index 0000000000..eaa8c4ab42 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/12/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\xg", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/actual.js new file mode 100644 index 0000000000..28ab31c9c1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/actual.js @@ -0,0 +1 @@ +sampleTag`\xAg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/expected.json new file mode 100644 index 0000000000..6422cab83c --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/13/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\xAg", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/actual.js new file mode 100644 index 0000000000..cc0ec32af0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/actual.js @@ -0,0 +1 @@ +sampleTag`\xAg${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/expected.json new file mode 100644 index 0000000000..253459c464 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/14/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\xAg", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/actual.js new file mode 100644 index 0000000000..cd57463528 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\xAg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/expected.json new file mode 100644 index 0000000000..ec73dac5d8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/15/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\xAg", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/actual.js new file mode 100644 index 0000000000..04cdb9e9b2 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\xAg${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/expected.json new file mode 100644 index 0000000000..bf367875f1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/16/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\xAg", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/actual.js new file mode 100644 index 0000000000..191ca653c0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/actual.js @@ -0,0 +1 @@ +sampleTag`\u0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/expected.json new file mode 100644 index 0000000000..db6bfd7588 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/17/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\u0", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/actual.js new file mode 100644 index 0000000000..ab93eda9d9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/actual.js @@ -0,0 +1 @@ +sampleTag`\u0${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/expected.json new file mode 100644 index 0000000000..7d1d4ecac2 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/18/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\u0", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 17, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/actual.js new file mode 100644 index 0000000000..d26dfc60e7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/expected.json new file mode 100644 index 0000000000..30b397ba11 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/19/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\u0", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/actual.js new file mode 100644 index 0000000000..4fb52640f5 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/actual.js @@ -0,0 +1 @@ +sampleTag`\01${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/expected.json new file mode 100644 index 0000000000..dc2581302c --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/2/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\01", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 17, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/actual.js new file mode 100644 index 0000000000..7b0f56fa2a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u0${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/expected.json new file mode 100644 index 0000000000..5995e5c491 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/20/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\u0", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/actual.js new file mode 100644 index 0000000000..6aa1d27769 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/actual.js @@ -0,0 +1 @@ +sampleTag`\u0g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/expected.json new file mode 100644 index 0000000000..3eff694145 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/21/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\u0g", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/actual.js new file mode 100644 index 0000000000..44eb637a41 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/actual.js @@ -0,0 +1 @@ +sampleTag`\u0g${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/expected.json new file mode 100644 index 0000000000..fcfe7dbcd0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/22/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\u0g", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/actual.js new file mode 100644 index 0000000000..30d440cd97 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u0g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/expected.json new file mode 100644 index 0000000000..aa1740dac3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/23/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\u0g", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/actual.js new file mode 100644 index 0000000000..59d991056a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u0g${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/expected.json new file mode 100644 index 0000000000..39b3bb484e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/24/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\u0g", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/actual.js new file mode 100644 index 0000000000..05d2fafe66 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/actual.js @@ -0,0 +1 @@ +sampleTag`\u00g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/expected.json new file mode 100644 index 0000000000..f978e9e2bb --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/25/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u00g", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/actual.js new file mode 100644 index 0000000000..525cfc3d26 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/actual.js @@ -0,0 +1 @@ +sampleTag`\u00g${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/expected.json new file mode 100644 index 0000000000..02603f46cd --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/26/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u00g", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/actual.js new file mode 100644 index 0000000000..b5687e98f8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u00g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/expected.json new file mode 100644 index 0000000000..bda12c9651 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/27/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u00g", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/actual.js new file mode 100644 index 0000000000..39b7ca87b5 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u00g${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/expected.json new file mode 100644 index 0000000000..2ee6bf6d75 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/28/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u00g", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/actual.js new file mode 100644 index 0000000000..a409ba9123 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/actual.js @@ -0,0 +1 @@ +sampleTag`\u000g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/expected.json new file mode 100644 index 0000000000..ab787c76b0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/29/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": { + "raw": "\\u000g", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/actual.js new file mode 100644 index 0000000000..592b5c6eb8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\01` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/expected.json new file mode 100644 index 0000000000..82a87607c9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/3/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\01", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/actual.js new file mode 100644 index 0000000000..c1b737a8de --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/actual.js @@ -0,0 +1 @@ +sampleTag`\u000g${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/expected.json new file mode 100644 index 0000000000..5467e09a34 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/30/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": { + "raw": "\\u000g", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 20, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/actual.js new file mode 100644 index 0000000000..1936125122 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u000g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/expected.json new file mode 100644 index 0000000000..7792df9415 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/31/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "\\u000g", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/actual.js new file mode 100644 index 0000000000..8920322734 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u000g${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/expected.json new file mode 100644 index 0000000000..00a0ad78bc --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/32/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "\\u000g", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/actual.js new file mode 100644 index 0000000000..ff7451e4f7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/actual.js @@ -0,0 +1 @@ +sampleTag`\u{}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/expected.json new file mode 100644 index 0000000000..11d9cd92b3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/33/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\u{}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/actual.js new file mode 100644 index 0000000000..b936b2aa79 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/actual.js @@ -0,0 +1 @@ +sampleTag`\u{}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/expected.json new file mode 100644 index 0000000000..072eac4db4 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/34/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\u{}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/actual.js new file mode 100644 index 0000000000..af58ad5476 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/expected.json new file mode 100644 index 0000000000..f6e57d84f1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/35/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\u{}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/actual.js new file mode 100644 index 0000000000..9809674f2d --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/expected.json new file mode 100644 index 0000000000..5a52cbb588 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/36/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\u{}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/actual.js new file mode 100644 index 0000000000..f3b7c60be7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/actual.js @@ -0,0 +1 @@ +sampleTag`\u{-0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/expected.json new file mode 100644 index 0000000000..b6ad827a92 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/37/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": { + "raw": "\\u{-0}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/actual.js new file mode 100644 index 0000000000..2de362b243 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/actual.js @@ -0,0 +1 @@ +sampleTag`\u{-0}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/expected.json new file mode 100644 index 0000000000..b25f264baf --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/38/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "value": { + "raw": "\\u{-0}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 20, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/actual.js new file mode 100644 index 0000000000..aec71687c2 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{-0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/expected.json new file mode 100644 index 0000000000..d0ee5e2b4f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/39/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "\\u{-0}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/actual.js new file mode 100644 index 0000000000..4e72a53bb6 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\01${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/expected.json new file mode 100644 index 0000000000..3c240cbca5 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/4/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\01", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/actual.js new file mode 100644 index 0000000000..4884482024 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{-0}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/expected.json new file mode 100644 index 0000000000..c5c6235df6 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/40/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "\\u{-0}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/actual.js new file mode 100644 index 0000000000..0dbd371767 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/actual.js @@ -0,0 +1 @@ +sampleTag`\u{g}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/expected.json new file mode 100644 index 0000000000..70facd5b6a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/41/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u{g}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/actual.js new file mode 100644 index 0000000000..506ec11d83 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/actual.js @@ -0,0 +1 @@ +sampleTag`\u{g}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/expected.json new file mode 100644 index 0000000000..4dd20c77bc --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/42/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u{g}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/actual.js new file mode 100644 index 0000000000..2f863994a4 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{g}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/expected.json new file mode 100644 index 0000000000..d75d926a77 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/43/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u{g}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/actual.js new file mode 100644 index 0000000000..96f9d738d9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{g}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/expected.json new file mode 100644 index 0000000000..811cbc9664 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/44/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u{g}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/actual.js new file mode 100644 index 0000000000..7be4c3fa0f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/actual.js @@ -0,0 +1 @@ +sampleTag`\u{` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/expected.json new file mode 100644 index 0000000000..7e104de733 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/45/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\u{", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/actual.js new file mode 100644 index 0000000000..000f2fbf37 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/actual.js @@ -0,0 +1 @@ +sampleTag`\u{${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/expected.json new file mode 100644 index 0000000000..3f850af6f9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/46/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\u{", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 17, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/actual.js new file mode 100644 index 0000000000..74d5b29f61 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/expected.json new file mode 100644 index 0000000000..4d25257bf2 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/47/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\u{", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/actual.js new file mode 100644 index 0000000000..849edc693e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/expected.json new file mode 100644 index 0000000000..54b4914e13 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/48/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "\\u{", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/actual.js new file mode 100644 index 0000000000..9575b3d816 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/actual.js @@ -0,0 +1 @@ +sampleTag`\u{\\` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/expected.json new file mode 100644 index 0000000000..5dc69624b3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/49/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u{\\\\", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/actual.js new file mode 100644 index 0000000000..00c3211a93 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/actual.js @@ -0,0 +1 @@ +sampleTag`\1` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/expected.json new file mode 100644 index 0000000000..bf13103e1f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/5/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": { + "raw": "\\1", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/actual.js new file mode 100644 index 0000000000..a931f49dc3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/actual.js @@ -0,0 +1 @@ +sampleTag`\u{\\${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/expected.json new file mode 100644 index 0000000000..88982b42de --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/50/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u{\\\\", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/actual.js new file mode 100644 index 0000000000..6c51808602 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{\\` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/expected.json new file mode 100644 index 0000000000..999202808b --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/51/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u{\\\\", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/actual.js new file mode 100644 index 0000000000..71c32286f8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{\\${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/expected.json new file mode 100644 index 0000000000..ff94ba4145 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/52/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u{\\\\", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/actual.js new file mode 100644 index 0000000000..dadcb43b49 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/actual.js @@ -0,0 +1 @@ +sampleTag`\u{\`` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/expected.json new file mode 100644 index 0000000000..bd743338a8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/53/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u{\\`", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/actual.js new file mode 100644 index 0000000000..9d9f26b33b --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/actual.js @@ -0,0 +1 @@ +sampleTag`\u{\`${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/expected.json new file mode 100644 index 0000000000..1ef2fcc477 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/54/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "value": { + "raw": "\\u{\\`", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/actual.js new file mode 100644 index 0000000000..e108605dd8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{\`` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/expected.json new file mode 100644 index 0000000000..db9472adc3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/55/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u{\\`", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/actual.js new file mode 100644 index 0000000000..c53213af0b --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{\`${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/expected.json new file mode 100644 index 0000000000..a29dca62cb --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/56/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "\\u{\\`", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/actual.js new file mode 100644 index 0000000000..35fb813aeb --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/actual.js @@ -0,0 +1 @@ +sampleTag`\u{0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/expected.json new file mode 100644 index 0000000000..440e1e7b6c --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/57/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\u{0", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/actual.js new file mode 100644 index 0000000000..e6a45880f4 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/actual.js @@ -0,0 +1 @@ +sampleTag`\u{0${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/expected.json new file mode 100644 index 0000000000..d5c6e26513 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/58/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "\\u{0", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/actual.js new file mode 100644 index 0000000000..8c3d8e2394 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/expected.json new file mode 100644 index 0000000000..ea9c9bb696 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/59/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\u{0", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/actual.js new file mode 100644 index 0000000000..636accd45c --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/actual.js @@ -0,0 +1 @@ +sampleTag`\1${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/expected.json new file mode 100644 index 0000000000..e756aa3c50 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/6/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "value": { + "raw": "\\1", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/actual.js new file mode 100644 index 0000000000..3c91289aa4 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{0${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/expected.json new file mode 100644 index 0000000000..d77b26a5d6 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/60/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "value": { + "raw": "\\u{0", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 26, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/actual.js new file mode 100644 index 0000000000..a04b3de90f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/actual.js @@ -0,0 +1 @@ +sampleTag`\u{\u{0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/expected.json new file mode 100644 index 0000000000..4d954dc2d3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/61/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": { + "raw": "\\u{\\u{0}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/actual.js new file mode 100644 index 0000000000..a01abfbccb --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/actual.js @@ -0,0 +1 @@ +sampleTag`\u{\u{0}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/expected.json new file mode 100644 index 0000000000..a4ab688484 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/62/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "value": { + "raw": "\\u{\\u{0}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/actual.js new file mode 100644 index 0000000000..7180334fe7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{\u{0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/expected.json new file mode 100644 index 0000000000..d6f59b6cd6 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/63/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": { + "raw": "\\u{\\u{0}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/actual.js new file mode 100644 index 0000000000..913257ec23 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{\u{0}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/expected.json new file mode 100644 index 0000000000..b3cd32eb66 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/64/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "value": { + "raw": "\\u{\\u{0}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 30, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/actual.js new file mode 100644 index 0000000000..57cee514aa --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/actual.js @@ -0,0 +1 @@ +sampleTag`\u{110000}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/expected.json new file mode 100644 index 0000000000..d381bed78f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/65/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": { + "raw": "\\u{110000}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/actual.js new file mode 100644 index 0000000000..1021623c19 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/actual.js @@ -0,0 +1 @@ +sampleTag`\u{110000}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/expected.json new file mode 100644 index 0000000000..b6d1bad8e0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/66/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": { + "raw": "\\u{110000}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/actual.js new file mode 100644 index 0000000000..28d404e2e8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{110000}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/expected.json new file mode 100644 index 0000000000..9f89295266 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/67/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "raw": "\\u{110000}", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/actual.js new file mode 100644 index 0000000000..ddfde0880a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\u{110000}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/expected.json new file mode 100644 index 0000000000..59ad74af19 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/68/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "value": { + "raw": "\\u{110000}", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 32, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/actual.js new file mode 100644 index 0000000000..7ae506f9be --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\1` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/expected.json new file mode 100644 index 0000000000..8dd1cb7248 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/7/expected.json @@ -0,0 +1,160 @@ +{ + "type": "File", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": { + "raw": "\\1", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/actual.js new file mode 100644 index 0000000000..808e93f360 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/actual.js @@ -0,0 +1 @@ +sampleTag`left${0}\1${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/expected.json new file mode 100644 index 0000000000..8fd7e0ab30 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/8/expected.json @@ -0,0 +1,200 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "expressions": [ + { + "type": "NumericLiteral", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "NumericLiteral", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + ], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "value": { + "raw": "left", + "cooked": "left" + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "value": { + "raw": "\\1", + "cooked": null + }, + "tail": false + }, + { + "type": "TemplateElement", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "value": { + "raw": "right", + "cooked": "right" + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/actual.js new file mode 100644 index 0000000000..6a82dddf36 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/actual.js @@ -0,0 +1 @@ +sampleTag`\xg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/expected.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/expected.json new file mode 100644 index 0000000000..2306ad4846 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/9/expected.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "TaggedTemplateExpression", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "tag": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "sampleTag" + }, + "name": "sampleTag" + }, + "quasi": { + "type": "TemplateLiteral", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "value": { + "raw": "\\xg", + "cooked": null + }, + "tail": true + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-tagged/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/options.json new file mode 100644 index 0000000000..eb93fe5b94 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-tagged/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["templateInvalidEscapes"] +} diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/actual.js new file mode 100644 index 0000000000..38c654a5b4 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/actual.js @@ -0,0 +1 @@ +`\01` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/1/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/actual.js new file mode 100644 index 0000000000..f9b52ebde0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/actual.js @@ -0,0 +1 @@ +`\xg${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/10/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/actual.js new file mode 100644 index 0000000000..a0c30ccebf --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/actual.js @@ -0,0 +1 @@ +`left${0}\xg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/11/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/actual.js new file mode 100644 index 0000000000..b951c4896c --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/actual.js @@ -0,0 +1 @@ +`left${0}\xg${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/12/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/actual.js new file mode 100644 index 0000000000..59702c7be1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/actual.js @@ -0,0 +1 @@ +`\xAg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/13/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/actual.js new file mode 100644 index 0000000000..2b1e66e6c5 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/actual.js @@ -0,0 +1 @@ +`\xAg${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/14/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/actual.js new file mode 100644 index 0000000000..1742efdd1d --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/actual.js @@ -0,0 +1 @@ +`left${0}\xAg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/15/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/actual.js new file mode 100644 index 0000000000..0b999a4306 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/actual.js @@ -0,0 +1 @@ +`left${0}\xAg${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/16/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/actual.js new file mode 100644 index 0000000000..5750e28788 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/actual.js @@ -0,0 +1 @@ +`\u0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/17/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/actual.js new file mode 100644 index 0000000000..8f0e13d9f8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/actual.js @@ -0,0 +1 @@ +`\u0${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/18/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/actual.js new file mode 100644 index 0000000000..84fc9009b6 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/actual.js @@ -0,0 +1 @@ +`left${0}\u0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/19/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/actual.js new file mode 100644 index 0000000000..629c7645c9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/actual.js @@ -0,0 +1 @@ +`\01${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/2/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/actual.js new file mode 100644 index 0000000000..66024330d3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/actual.js @@ -0,0 +1 @@ +`left${0}\u0${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/20/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/actual.js new file mode 100644 index 0000000000..55cd59a2c7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/actual.js @@ -0,0 +1 @@ +`\u0g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/21/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/actual.js new file mode 100644 index 0000000000..0968b3b2b0 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/actual.js @@ -0,0 +1 @@ +`\u0g${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/22/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/actual.js new file mode 100644 index 0000000000..39b67a92dd --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/actual.js @@ -0,0 +1 @@ +`left${0}\u0g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/23/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/actual.js new file mode 100644 index 0000000000..d3656d3d08 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/actual.js @@ -0,0 +1 @@ +`left${0}\u0g${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/24/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/actual.js new file mode 100644 index 0000000000..f401af6e63 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/actual.js @@ -0,0 +1 @@ +`\u00g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/25/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/actual.js new file mode 100644 index 0000000000..bbd2bb505b --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/actual.js @@ -0,0 +1 @@ +`\u00g${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/26/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/actual.js new file mode 100644 index 0000000000..710a43999a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/actual.js @@ -0,0 +1 @@ +`left${0}\u00g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/27/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/actual.js new file mode 100644 index 0000000000..f4a5e3653a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/actual.js @@ -0,0 +1 @@ +`left${0}\u00g${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/28/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/actual.js new file mode 100644 index 0000000000..4c4daa380e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/actual.js @@ -0,0 +1 @@ +`\u000g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/29/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/actual.js new file mode 100644 index 0000000000..3663eaffcc --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/actual.js @@ -0,0 +1 @@ +`left${0}\01` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/3/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/actual.js new file mode 100644 index 0000000000..d0525f75cb --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/actual.js @@ -0,0 +1 @@ +`\u000g${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/30/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/actual.js new file mode 100644 index 0000000000..981b65ab1f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/actual.js @@ -0,0 +1 @@ +`left${0}\u000g` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/31/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/actual.js new file mode 100644 index 0000000000..c6441febbd --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/actual.js @@ -0,0 +1 @@ +`left${0}\u000g${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/32/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/actual.js new file mode 100644 index 0000000000..90ace87a84 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/actual.js @@ -0,0 +1 @@ +`\u{}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/33/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/actual.js new file mode 100644 index 0000000000..eadeb7b3cd --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/actual.js @@ -0,0 +1 @@ +`\u{}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/34/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/actual.js new file mode 100644 index 0000000000..cd7b76fe4f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/actual.js @@ -0,0 +1 @@ +`left${0}\u{}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/35/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/actual.js new file mode 100644 index 0000000000..79a1eedc9a --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/actual.js @@ -0,0 +1 @@ +`left${0}\u{}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/36/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/actual.js new file mode 100644 index 0000000000..d7c716f1b5 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/actual.js @@ -0,0 +1 @@ +`\u{-0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/37/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/actual.js new file mode 100644 index 0000000000..da568ab1dd --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/actual.js @@ -0,0 +1 @@ +`\u{-0}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/38/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/actual.js new file mode 100644 index 0000000000..a564107d91 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/actual.js @@ -0,0 +1 @@ +`left${0}\u{-0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/39/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/actual.js new file mode 100644 index 0000000000..f0ea873a5d --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/actual.js @@ -0,0 +1 @@ +`left${0}\01${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/4/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/actual.js new file mode 100644 index 0000000000..66ecba8b94 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/actual.js @@ -0,0 +1 @@ +`left${0}\u{-0}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/40/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/actual.js new file mode 100644 index 0000000000..a4b058d036 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/actual.js @@ -0,0 +1 @@ +`\u{g}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/41/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/actual.js new file mode 100644 index 0000000000..05dd670eb9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/actual.js @@ -0,0 +1 @@ +`\u{g}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/42/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/actual.js new file mode 100644 index 0000000000..0c02fbcc5b --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/actual.js @@ -0,0 +1 @@ +`left${0}\u{g}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/43/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/actual.js new file mode 100644 index 0000000000..f81c6beccc --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/actual.js @@ -0,0 +1 @@ +`left${0}\u{g}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/44/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/actual.js new file mode 100644 index 0000000000..2e6b74b44e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/actual.js @@ -0,0 +1 @@ +`\u{` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/45/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/actual.js new file mode 100644 index 0000000000..162c16696d --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/actual.js @@ -0,0 +1 @@ +`\u{${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/46/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/actual.js new file mode 100644 index 0000000000..72bc784142 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/actual.js @@ -0,0 +1 @@ +`left${0}\u{` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/47/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/actual.js new file mode 100644 index 0000000000..af0cefff92 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/actual.js @@ -0,0 +1 @@ +`left${0}\u{${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/48/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/actual.js new file mode 100644 index 0000000000..512229f60c --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/actual.js @@ -0,0 +1 @@ +`\u{\\` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/49/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/actual.js new file mode 100644 index 0000000000..a4ffac63b8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/actual.js @@ -0,0 +1 @@ +`\1` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/5/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/actual.js new file mode 100644 index 0000000000..2811cdfcf9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/actual.js @@ -0,0 +1 @@ +`\u{\\${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/50/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/actual.js new file mode 100644 index 0000000000..1f3f5e3640 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/actual.js @@ -0,0 +1 @@ +`left${0}\u{\\` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/51/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/actual.js new file mode 100644 index 0000000000..fd255a9f91 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/actual.js @@ -0,0 +1 @@ +`left${0}\u{\\${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/52/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/actual.js new file mode 100644 index 0000000000..77e7e029e4 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/actual.js @@ -0,0 +1 @@ +`\u{\`` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/53/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/actual.js new file mode 100644 index 0000000000..843e2f4031 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/actual.js @@ -0,0 +1 @@ +`\u{\`${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/54/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/actual.js new file mode 100644 index 0000000000..08c9e10363 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/actual.js @@ -0,0 +1 @@ +`left${0}\u{\`` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/55/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/actual.js new file mode 100644 index 0000000000..d6b1f25a7e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/actual.js @@ -0,0 +1 @@ +`left${0}\u{\`${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/56/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/actual.js new file mode 100644 index 0000000000..af2be992b1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/actual.js @@ -0,0 +1 @@ +`\u{0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/57/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/actual.js new file mode 100644 index 0000000000..6612fdbb02 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/actual.js @@ -0,0 +1 @@ +`\u{0${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/58/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/actual.js new file mode 100644 index 0000000000..983aae670e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/actual.js @@ -0,0 +1 @@ +`left${0}\u{0` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/59/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/actual.js new file mode 100644 index 0000000000..554c901c69 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/actual.js @@ -0,0 +1 @@ +`\1${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/6/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/actual.js new file mode 100644 index 0000000000..611f774bdc --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/actual.js @@ -0,0 +1 @@ +`left${0}\u{0${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/60/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/actual.js new file mode 100644 index 0000000000..6b91a4e8c7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/actual.js @@ -0,0 +1 @@ +`\u{\u{0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/61/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/actual.js new file mode 100644 index 0000000000..18df761fc1 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/actual.js @@ -0,0 +1 @@ +`\u{\u{0}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/62/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/actual.js new file mode 100644 index 0000000000..5d54005046 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/actual.js @@ -0,0 +1 @@ +`left${0}\u{\u{0}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/63/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/actual.js new file mode 100644 index 0000000000..e5989149e9 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/actual.js @@ -0,0 +1 @@ +`left${0}\u{\u{0}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/64/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/actual.js new file mode 100644 index 0000000000..63b6915978 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/actual.js @@ -0,0 +1 @@ +`\u{110000}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/65/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/actual.js new file mode 100644 index 0000000000..4fa89bb1d3 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/actual.js @@ -0,0 +1 @@ +`\u{110000}${0}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/66/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/actual.js new file mode 100644 index 0000000000..9d9819b1eb --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/actual.js @@ -0,0 +1 @@ +`left${0}\u{110000}` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/67/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/actual.js new file mode 100644 index 0000000000..0ff67f82a6 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/actual.js @@ -0,0 +1 @@ +`left${0}\u{110000}${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/68/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/actual.js new file mode 100644 index 0000000000..03b6467b6f --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/actual.js @@ -0,0 +1 @@ +`left${0}\1` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/7/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/actual.js new file mode 100644 index 0000000000..384fad327e --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/actual.js @@ -0,0 +1 @@ +`left${0}\1${1}right` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/options.json new file mode 100644 index 0000000000..06ac8464d7 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/8/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:10)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/actual.js b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/actual.js new file mode 100644 index 0000000000..a8dec8c005 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/actual.js @@ -0,0 +1 @@ +`\xg` \ No newline at end of file diff --git a/test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/options.json b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/options.json new file mode 100644 index 0000000000..1cd5cd7bc8 --- /dev/null +++ b/test/fixtures/experimental/template-literal-invalid-escapes-untagged/9/options.json @@ -0,0 +1,6 @@ +{ + "throws": "Invalid escape sequence in template (1:2)", + "plugins": [ + "templateInvalidEscapes" + ] +} \ No newline at end of file