diff --git a/package.json b/package.json index 84d053d1..fcf05cc3 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ ], "scripts": { "lint": "DEBUG=eslint:cli-engine eslint .", - "prettier": "prettier --plugin=./src/index.js --parser=melody", + "prettier": "prettier --plugin=./src/index.js --parser=twig", "test": "vitest --run" }, "dependencies": { diff --git a/src/index.js b/src/index.js index 6d0e7a32..f1d33e71 100644 --- a/src/index.js +++ b/src/index.js @@ -10,16 +10,9 @@ import * as publicFunctions from "./util/publicFunctions.js"; */ const languages = [ { - name: "melody", - parsers: ["melody"], - group: "Melody", - tmScope: "melody.twig", - aceMode: "html", - codemirrorMode: "clike", - codemirrorMimeType: "text/melody-twig", - extensions: [".melody.twig", ".html.twig", ".twig"], - linguistLanguageId: 0, - vscodeLanguageIds: ["twig"] + name: "twig", + parsers: ["twig"], + extensions: [".html.twig", ".twig"] } ]; @@ -29,9 +22,9 @@ const languages = [ * @type Record */ const parsers = { - melody: { + twig: { parse, - astFormat: "melody", + astFormat: "twig", hasPragma() { return false; }, @@ -50,7 +43,7 @@ const parsers = { * @type Record */ const printers = { - melody: { + twig: { print, printComment(commentPath) { const comment = commentPath.getValue(); diff --git a/tests/Comments/__snapshots__/jsfmt.spec.js.snap b/tests/Comments/__snapshots__/jsfmt.spec.js.snap index 66a1c10f..4720bae9 100644 --- a/tests/Comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/Comments/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`htmlComments.melody.twig - melody-verify > htmlComments.melody.twig 1`] = ` +exports[`htmlComments.melody.twig - twig-verify > htmlComments.melody.twig 1`] = ` This is a paragraph @@ -34,7 +34,7 @@ A third paragraph `; -exports[`twigComments.melody.twig - melody-verify > twigComments.melody.twig 1`] = ` +exports[`twigComments.melody.twig - twig-verify > twigComments.melody.twig 1`] = ` {# One #} {# Two #} diff --git a/tests/Comments/jsfmt.spec.js b/tests/Comments/jsfmt.spec.js index 1631c74c..6b479d38 100644 --- a/tests/Comments/jsfmt.spec.js +++ b/tests/Comments/jsfmt.spec.js @@ -1 +1 @@ -run_spec(__dirname, ["melody"]); +run_spec(__dirname, ["twig"]); diff --git a/tests/ConstantValue/__snapshots__/jsfmt.spec.js.snap b/tests/ConstantValue/__snapshots__/jsfmt.spec.js.snap index 48eec895..c92d4e23 100644 --- a/tests/ConstantValue/__snapshots__/jsfmt.spec.js.snap +++ b/tests/ConstantValue/__snapshots__/jsfmt.spec.js.snap @@ -1,20 +1,20 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`constant-value-int.melody.twig - melody-verify > constant-value-int.melody.twig 1`] = ` +exports[`constant-value-int.melody.twig - twig-verify > constant-value-int.melody.twig 1`] = ` 123 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 `; -exports[`constant-value-string.melody.twig - melody-verify > constant-value-string.melody.twig 1`] = ` +exports[`constant-value-string.melody.twig - twig-verify > constant-value-string.melody.twig 1`] = ` Test string ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test string `; -exports[`special-cases.melody.twig - melody-verify > special-cases.melody.twig 1`] = ` +exports[`special-cases.melody.twig - twig-verify > special-cases.melody.twig 1`] = ` {% if isRTL %}‎{% endif %} {% if searchResultFailing %} diff --git a/tests/ConstantValue/jsfmt.spec.js b/tests/ConstantValue/jsfmt.spec.js index 1631c74c..6b479d38 100644 --- a/tests/ConstantValue/jsfmt.spec.js +++ b/tests/ConstantValue/jsfmt.spec.js @@ -1 +1 @@ -run_spec(__dirname, ["melody"]); +run_spec(__dirname, ["twig"]); diff --git a/tests/ControlStructures/__snapshots__/jsfmt.spec.js.snap b/tests/ControlStructures/__snapshots__/jsfmt.spec.js.snap index a1f6d08c..51a5059f 100644 --- a/tests/ControlStructures/__snapshots__/jsfmt.spec.js.snap +++ b/tests/ControlStructures/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`for.melody.twig - melody-verify > for.melody.twig 1`] = ` +exports[`for.melody.twig - twig-verify > for.melody.twig 1`] = `