From fe0c8d51b1761db80b07eb51bc7d22f17d066c5f Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 21 Oct 2023 19:02:21 +0200 Subject: [PATCH] feat: document symbol provider (#659) ### Summary of Changes Implement a document symbol provider. Compared to the default provider, it sets proper symbol kinds, adds details for functions and segments to show their signature, and marks symbols as deprecated. --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com> --- package-lock.json | 446 +++++++++--------- package.json | 18 +- .../lsp/safe-ds-document-symbol-provider.ts | 89 ++++ .../lsp/safe-ds-node-kind-provider.ts | 93 ++++ .../lsp/safe-ds-semantic-token-provider.ts | 4 +- src/language/partialEvaluation/model.ts | 2 +- src/language/safe-ds-module.ts | 6 + src/language/typing/model.ts | 2 +- .../validation/builtins/deprecated.ts | 2 +- .../other/declarations/placeholders.ts | 2 +- .../validation/other/declarations/segments.ts | 2 +- tests/helpers/diagnostics.ts | 2 +- .../builtins/builtinFilesCorrectness.test.ts | 2 +- tests/language/lsp/formatting/creator.ts | 2 +- .../safe-ds-document-symbol-provider.test.ts | 265 +++++++++++ .../safe-ds-semantic-token-provider.test.ts | 2 +- tests/language/scoping/testScoping.test.ts | 3 +- tests/language/validation/creator.ts | 2 +- .../validation/testValidation.test.ts | 2 +- .../calls/of enum variants/main.sdstest | 10 +- .../calls/unresolved/main.sdstest | 4 +- .../indexed access/on lists/main.sdstest | 10 +- .../indexed access/on maps/main.sdstest | 6 +- .../indexed access/on other/main.sdstest | 4 +- .../infix operations/and/main.sdstest | 8 +- .../infix operations/divided by/main.sdstest | 14 +- .../infix operations/elvis/main.sdstest | 4 +- .../infix operations/equals/main.sdstest | 4 +- .../greater than or equals/main.sdstest | 8 +- .../greater than/main.sdstest | 8 +- .../identical to/main.sdstest | 4 +- .../less than or equals/main.sdstest | 8 +- .../infix operations/less than/main.sdstest | 8 +- .../infix operations/minus/main.sdstest | 8 +- .../infix operations/not equals/main.sdstest | 4 +- .../not identical to/main.sdstest | 4 +- .../infix operations/or/main.sdstest | 8 +- .../infix operations/plus/main.sdstest | 8 +- .../infix operations/times/main.sdstest | 8 +- .../recursive cases/lists/main.sdstest | 2 +- .../recursive cases/maps/main.sdstest | 2 +- .../member accesses/unresolved/main.sdstest | 4 +- .../prefix operations/minus/main.sdstest | 4 +- .../prefix operations/not/main.sdstest | 4 +- .../template strings/main.sdstest | 2 +- .../block lambda results/main.sdstest | 2 +- .../assignees/placeholders/main.sdstest | 2 +- .../typing/assignees/yields/main.sdstest | 2 +- .../declarations/annotations/main.sdstest | 2 +- .../declarations/attributes/main.sdstest | 4 +- .../declarations/functions/main.sdstest | 2 +- .../parameters/of annotations/main.sdstest | 2 +- .../that are isolated/main.sdstest | 2 +- .../that are passed as arguments/main.sdstest | 8 +- .../that are yielded/main.sdstest | 4 +- .../parameters/of callable types/main.sdstest | 2 +- .../parameters/of classes/main.sdstest | 2 +- .../parameters/of enum variants/main.sdstest | 2 +- .../that are isolated/main.sdstest | 2 +- .../that are passed as arguments/main.sdstest | 8 +- .../that are yielded/main.sdstest | 4 +- .../parameters/of functions/main.sdstest | 2 +- .../parameters/of segments/main.sdstest | 2 +- .../declarations/pipelines/main.sdstest | 2 +- .../typing/declarations/segments/main.sdstest | 2 +- .../that are isolated/main.sdstest | 4 +- .../that are passed as arguments/main.sdstest | 12 +- .../that are yielded/main.sdstest | 4 +- .../with manifest types/main.sdstest | 2 +- .../calls/of annotations/main.sdstest | 2 +- .../expressions/calls/of classes/main.sdstest | 2 +- .../calls/of enum variants/main.sdstest | 12 +- .../calls/of non-callable/main.sdstest | 2 +- .../expressions/calls/unresolved/main.sdstest | 2 +- .../that are isolated/main.sdstest | 4 +- .../that are passed as arguments/main.sdstest | 10 +- .../that are yielded/main.sdstest | 4 +- .../expressions/indexed accesses/main.sdstest | 4 +- .../member accesses/unresolved/main.sdstest | 4 +- .../references/unresolved/main.sdstest | 2 +- .../typing/types/callable types/main.sdstest | 2 +- .../typing/types/member types/main.sdstest | 4 +- .../typing/types/named types/main.sdstest | 4 +- .../typing/types/type arguments/main.sdstest | 4 +- 84 files changed, 847 insertions(+), 399 deletions(-) create mode 100644 src/language/lsp/safe-ds-document-symbol-provider.ts create mode 100644 src/language/lsp/safe-ds-node-kind-provider.ts create mode 100644 tests/language/lsp/safe-ds-document-symbol-provider.test.ts diff --git a/package-lock.json b/package-lock.json index 07738bff9..b97155548 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,35 +11,33 @@ "dependencies": { "chalk": "^5.3.0", "chevrotain": "^11.0.3", - "commander": "^11.0.0", + "commander": "^11.1.0", "glob": "^10.3.10", "langium": "^2.0.2", "radash": "^11.0.0", "true-myth": "^7.1.0", "vscode-languageclient": "^9.0.1", - "vscode-languageserver": "^9.0.1", - "vscode-languageserver-types": "^3.17.5", - "vscode-uri": "^3.0.7" + "vscode-languageserver": "^9.0.1" }, "bin": { "safe-ds-cli": "bin/cli" }, "devDependencies": { - "@lars-reimann/eslint-config": "^5.1.3", + "@lars-reimann/eslint-config": "^5.1.4", "@lars-reimann/prettier-config": "^5.0.0", - "@types/node": "^18.18.1", - "@types/vscode": "^1.82.0", + "@types/node": "^18.18.6", + "@types/vscode": "^1.83.1", "@vitest/coverage-v8": "^0.34.6", "@vitest/ui": "^0.34.6", - "concurrently": "^8.2.1", - "esbuild": "^0.19.4", + "concurrently": "^8.2.2", + "esbuild": "^0.19.5", "esbuild-plugin-copy": "^2.1.1", "langium-cli": "^2.0.1", "typescript": "^5.2.2", "vitest": "^0.34.6" }, "engines": { - "vscode": "^1.82.0" + "vscode": "^1.83.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -118,9 +116,9 @@ "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==" }, "node_modules/@esbuild/android-arm": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.4.tgz", - "integrity": "sha512-uBIbiYMeSsy2U0XQoOGVVcpIktjLMEKa7ryz2RLr7L/vTnANNEsPVAh4xOv7ondGz6ac1zVb0F8Jx20rQikffQ==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", + "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", "cpu": [ "arm" ], @@ -134,9 +132,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.4.tgz", - "integrity": "sha512-mRsi2vJsk4Bx/AFsNBqOH2fqedxn5L/moT58xgg51DjX1la64Z3Npicut2VbhvDFO26qjWtPMsVxCd80YTFVeg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", + "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", "cpu": [ "arm64" ], @@ -150,9 +148,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.4.tgz", - "integrity": "sha512-4iPufZ1TMOD3oBlGFqHXBpa3KFT46aLl6Vy7gwed0ZSYgHaZ/mihbYb4t7Z9etjkC9Al3ZYIoOaHrU60gcMy7g==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", + "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", "cpu": [ "x64" ], @@ -166,9 +164,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.4.tgz", - "integrity": "sha512-Lviw8EzxsVQKpbS+rSt6/6zjn9ashUZ7Tbuvc2YENgRl0yZTktGlachZ9KMJUsVjZEGFVu336kl5lBgDN6PmpA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", + "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", "cpu": [ "arm64" ], @@ -182,9 +180,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.4.tgz", - "integrity": "sha512-YHbSFlLgDwglFn0lAO3Zsdrife9jcQXQhgRp77YiTDja23FrC2uwnhXMNkAucthsf+Psr7sTwYEryxz6FPAVqw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", + "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", "cpu": [ "x64" ], @@ -198,9 +196,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.4.tgz", - "integrity": "sha512-vz59ijyrTG22Hshaj620e5yhs2dU1WJy723ofc+KUgxVCM6zxQESmWdMuVmUzxtGqtj5heHyB44PjV/HKsEmuQ==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", + "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", "cpu": [ "arm64" ], @@ -214,9 +212,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.4.tgz", - "integrity": "sha512-3sRbQ6W5kAiVQRBWREGJNd1YE7OgzS0AmOGjDmX/qZZecq8NFlQsQH0IfXjjmD0XtUYqr64e0EKNFjMUlPL3Cw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", + "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", "cpu": [ "x64" ], @@ -230,9 +228,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.4.tgz", - "integrity": "sha512-z/4ArqOo9EImzTi4b6Vq+pthLnepFzJ92BnofU1jgNlcVb+UqynVFdoXMCFreTK7FdhqAzH0vmdwW5373Hm9pg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", + "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", "cpu": [ "arm" ], @@ -246,9 +244,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.4.tgz", - "integrity": "sha512-ZWmWORaPbsPwmyu7eIEATFlaqm0QGt+joRE9sKcnVUG3oBbr/KYdNE2TnkzdQwX6EDRdg/x8Q4EZQTXoClUqqA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", + "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", "cpu": [ "arm64" ], @@ -262,9 +260,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.4.tgz", - "integrity": "sha512-EGc4vYM7i1GRUIMqRZNCTzJh25MHePYsnQfKDexD8uPTCm9mK56NIL04LUfX2aaJ+C9vyEp2fJ7jbqFEYgO9lQ==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", + "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", "cpu": [ "ia32" ], @@ -278,9 +276,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.4.tgz", - "integrity": "sha512-WVhIKO26kmm8lPmNrUikxSpXcgd6HDog0cx12BUfA2PkmURHSgx9G6vA19lrlQOMw+UjMZ+l3PpbtzffCxFDRg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", + "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", "cpu": [ "loong64" ], @@ -294,9 +292,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.4.tgz", - "integrity": "sha512-keYY+Hlj5w86hNp5JJPuZNbvW4jql7c1eXdBUHIJGTeN/+0QFutU3GrS+c27L+NTmzi73yhtojHk+lr2+502Mw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", + "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", "cpu": [ "mips64el" ], @@ -310,9 +308,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.4.tgz", - "integrity": "sha512-tQ92n0WMXyEsCH4m32S21fND8VxNiVazUbU4IUGVXQpWiaAxOBvtOtbEt3cXIV3GEBydYsY8pyeRMJx9kn3rvw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", + "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", "cpu": [ "ppc64" ], @@ -326,9 +324,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.4.tgz", - "integrity": "sha512-tRRBey6fG9tqGH6V75xH3lFPpj9E8BH+N+zjSUCnFOX93kEzqS0WdyJHkta/mmJHn7MBaa++9P4ARiU4ykjhig==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", + "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", "cpu": [ "riscv64" ], @@ -342,9 +340,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.4.tgz", - "integrity": "sha512-152aLpQqKZYhThiJ+uAM4PcuLCAOxDsCekIbnGzPKVBRUDlgaaAfaUl5NYkB1hgY6WN4sPkejxKlANgVcGl9Qg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", + "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", "cpu": [ "s390x" ], @@ -358,9 +356,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.4.tgz", - "integrity": "sha512-Mi4aNA3rz1BNFtB7aGadMD0MavmzuuXNTaYL6/uiYIs08U7YMPETpgNn5oue3ICr+inKwItOwSsJDYkrE9ekVg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", + "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", "cpu": [ "x64" ], @@ -374,9 +372,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.4.tgz", - "integrity": "sha512-9+Wxx1i5N/CYo505CTT7T+ix4lVzEdz0uCoYGxM5JDVlP2YdDC1Bdz+Khv6IbqmisT0Si928eAxbmGkcbiuM/A==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", + "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", "cpu": [ "x64" ], @@ -390,9 +388,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.4.tgz", - "integrity": "sha512-MFsHleM5/rWRW9EivFssop+OulYVUoVcqkyOkjiynKBCGBj9Lihl7kh9IzrreDyXa4sNkquei5/DTP4uCk25xw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", + "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", "cpu": [ "x64" ], @@ -406,9 +404,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.4.tgz", - "integrity": "sha512-6Xq8SpK46yLvrGxjp6HftkDwPP49puU4OF0hEL4dTxqCbfx09LyrbUj/D7tmIRMj5D5FCUPksBbxyQhp8tmHzw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", + "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", "cpu": [ "x64" ], @@ -422,9 +420,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.4.tgz", - "integrity": "sha512-PkIl7Jq4mP6ke7QKwyg4fD4Xvn8PXisagV/+HntWoDEdmerB2LTukRZg728Yd1Fj+LuEX75t/hKXE2Ppk8Hh1w==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", + "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", "cpu": [ "arm64" ], @@ -438,9 +436,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.4.tgz", - "integrity": "sha512-ga676Hnvw7/ycdKB53qPusvsKdwrWzEyJ+AtItHGoARszIqvjffTwaaW3b2L6l90i7MO9i+dlAW415INuRhSGg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", + "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", "cpu": [ "ia32" ], @@ -454,9 +452,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.4.tgz", - "integrity": "sha512-HP0GDNla1T3ZL8Ko/SHAS2GgtjOg+VmWnnYLhuTksr++EnduYB0f3Y2LzHsUwb2iQ13JGoY6G3R8h6Du/WG6uA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", + "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", "cpu": [ "x64" ], @@ -719,9 +717,9 @@ } }, "node_modules/@lars-reimann/eslint-config": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-5.1.3.tgz", - "integrity": "sha512-Kzw8ksILtRzwXgWAdOuJ+06c5RuuBetqCxj2xIUYohvPSvpXPusuJzoEnXwiQcjCs6MNhaf6ZlmccB7JBe8fMw==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-5.1.4.tgz", + "integrity": "sha512-OtPNeiHJKK/sAAhdiTzd4j2Likv32RxEcxVmC8T0WIXVQKyaUVgr+bJlnxCJ+n9LPx986Ah/8o9Ac8JNmHYm9Q==", "dev": true, "dependencies": { "eslint-config-airbnb": "^19.0.4", @@ -840,9 +838,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "18.18.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.1.tgz", - "integrity": "sha512-3G42sxmm0fF2+Vtb9TJQpnjmP+uKlWvFa8KoEGquh4gqRmoUG/N0ufuhikw6HEsdG2G2oIKhog1GCTfz9v5NdQ==", + "version": "18.18.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", + "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", "dev": true }, "node_modules/@types/semver": { @@ -853,9 +851,9 @@ "peer": true }, "node_modules/@types/vscode": { - "version": "1.82.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.82.0.tgz", - "integrity": "sha512-VSHV+VnpF8DEm8LNrn8OJ8VuUNcBzN3tMvKrNpbhhfuVjFm82+6v44AbDhLvVFgCzn6vs94EJNTp7w8S6+Q1Rw==", + "version": "1.83.1", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.83.1.tgz", + "integrity": "sha512-BHu51NaNKOtDf3BOonY3sKFFmZKEpRkzqkZVpSYxowLbs5JqjOQemYFob7Gs5rpxE5tiGhfpnMpcdF/oKrLg4w==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -1677,9 +1675,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", "engines": { "node": ">=16" } @@ -1691,9 +1689,9 @@ "dev": true }, "node_modules/concurrently": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", - "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz", + "integrity": "sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -2009,9 +2007,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.4.tgz", - "integrity": "sha512-x7jL0tbRRpv4QUyuDMjONtWFciygUxWaUM1kMX2zWxI0X2YWOt7MSA0g4UdeSiHM8fcYVzpQhKYOycZwxTdZkA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", + "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", "dev": true, "hasInstallScript": true, "bin": { @@ -2021,28 +2019,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.4", - "@esbuild/android-arm64": "0.19.4", - "@esbuild/android-x64": "0.19.4", - "@esbuild/darwin-arm64": "0.19.4", - "@esbuild/darwin-x64": "0.19.4", - "@esbuild/freebsd-arm64": "0.19.4", - "@esbuild/freebsd-x64": "0.19.4", - "@esbuild/linux-arm": "0.19.4", - "@esbuild/linux-arm64": "0.19.4", - "@esbuild/linux-ia32": "0.19.4", - "@esbuild/linux-loong64": "0.19.4", - "@esbuild/linux-mips64el": "0.19.4", - "@esbuild/linux-ppc64": "0.19.4", - "@esbuild/linux-riscv64": "0.19.4", - "@esbuild/linux-s390x": "0.19.4", - "@esbuild/linux-x64": "0.19.4", - "@esbuild/netbsd-x64": "0.19.4", - "@esbuild/openbsd-x64": "0.19.4", - "@esbuild/sunos-x64": "0.19.4", - "@esbuild/win32-arm64": "0.19.4", - "@esbuild/win32-ia32": "0.19.4", - "@esbuild/win32-x64": "0.19.4" + "@esbuild/android-arm": "0.19.5", + "@esbuild/android-arm64": "0.19.5", + "@esbuild/android-x64": "0.19.5", + "@esbuild/darwin-arm64": "0.19.5", + "@esbuild/darwin-x64": "0.19.5", + "@esbuild/freebsd-arm64": "0.19.5", + "@esbuild/freebsd-x64": "0.19.5", + "@esbuild/linux-arm": "0.19.5", + "@esbuild/linux-arm64": "0.19.5", + "@esbuild/linux-ia32": "0.19.5", + "@esbuild/linux-loong64": "0.19.5", + "@esbuild/linux-mips64el": "0.19.5", + "@esbuild/linux-ppc64": "0.19.5", + "@esbuild/linux-riscv64": "0.19.5", + "@esbuild/linux-s390x": "0.19.5", + "@esbuild/linux-x64": "0.19.5", + "@esbuild/netbsd-x64": "0.19.5", + "@esbuild/openbsd-x64": "0.19.5", + "@esbuild/sunos-x64": "0.19.5", + "@esbuild/win32-arm64": "0.19.5", + "@esbuild/win32-ia32": "0.19.5", + "@esbuild/win32-x64": "0.19.5" } }, "node_modules/esbuild-plugin-copy": { @@ -6270,156 +6268,156 @@ "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==" }, "@esbuild/android-arm": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.4.tgz", - "integrity": "sha512-uBIbiYMeSsy2U0XQoOGVVcpIktjLMEKa7ryz2RLr7L/vTnANNEsPVAh4xOv7ondGz6ac1zVb0F8Jx20rQikffQ==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", + "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.4.tgz", - "integrity": "sha512-mRsi2vJsk4Bx/AFsNBqOH2fqedxn5L/moT58xgg51DjX1la64Z3Npicut2VbhvDFO26qjWtPMsVxCd80YTFVeg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", + "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.4.tgz", - "integrity": "sha512-4iPufZ1TMOD3oBlGFqHXBpa3KFT46aLl6Vy7gwed0ZSYgHaZ/mihbYb4t7Z9etjkC9Al3ZYIoOaHrU60gcMy7g==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", + "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.4.tgz", - "integrity": "sha512-Lviw8EzxsVQKpbS+rSt6/6zjn9ashUZ7Tbuvc2YENgRl0yZTktGlachZ9KMJUsVjZEGFVu336kl5lBgDN6PmpA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", + "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.4.tgz", - "integrity": "sha512-YHbSFlLgDwglFn0lAO3Zsdrife9jcQXQhgRp77YiTDja23FrC2uwnhXMNkAucthsf+Psr7sTwYEryxz6FPAVqw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", + "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.4.tgz", - "integrity": "sha512-vz59ijyrTG22Hshaj620e5yhs2dU1WJy723ofc+KUgxVCM6zxQESmWdMuVmUzxtGqtj5heHyB44PjV/HKsEmuQ==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", + "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.4.tgz", - "integrity": "sha512-3sRbQ6W5kAiVQRBWREGJNd1YE7OgzS0AmOGjDmX/qZZecq8NFlQsQH0IfXjjmD0XtUYqr64e0EKNFjMUlPL3Cw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", + "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.4.tgz", - "integrity": "sha512-z/4ArqOo9EImzTi4b6Vq+pthLnepFzJ92BnofU1jgNlcVb+UqynVFdoXMCFreTK7FdhqAzH0vmdwW5373Hm9pg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", + "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.4.tgz", - "integrity": "sha512-ZWmWORaPbsPwmyu7eIEATFlaqm0QGt+joRE9sKcnVUG3oBbr/KYdNE2TnkzdQwX6EDRdg/x8Q4EZQTXoClUqqA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", + "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.4.tgz", - "integrity": "sha512-EGc4vYM7i1GRUIMqRZNCTzJh25MHePYsnQfKDexD8uPTCm9mK56NIL04LUfX2aaJ+C9vyEp2fJ7jbqFEYgO9lQ==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", + "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.4.tgz", - "integrity": "sha512-WVhIKO26kmm8lPmNrUikxSpXcgd6HDog0cx12BUfA2PkmURHSgx9G6vA19lrlQOMw+UjMZ+l3PpbtzffCxFDRg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", + "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.4.tgz", - "integrity": "sha512-keYY+Hlj5w86hNp5JJPuZNbvW4jql7c1eXdBUHIJGTeN/+0QFutU3GrS+c27L+NTmzi73yhtojHk+lr2+502Mw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", + "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.4.tgz", - "integrity": "sha512-tQ92n0WMXyEsCH4m32S21fND8VxNiVazUbU4IUGVXQpWiaAxOBvtOtbEt3cXIV3GEBydYsY8pyeRMJx9kn3rvw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", + "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.4.tgz", - "integrity": "sha512-tRRBey6fG9tqGH6V75xH3lFPpj9E8BH+N+zjSUCnFOX93kEzqS0WdyJHkta/mmJHn7MBaa++9P4ARiU4ykjhig==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", + "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.4.tgz", - "integrity": "sha512-152aLpQqKZYhThiJ+uAM4PcuLCAOxDsCekIbnGzPKVBRUDlgaaAfaUl5NYkB1hgY6WN4sPkejxKlANgVcGl9Qg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", + "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.4.tgz", - "integrity": "sha512-Mi4aNA3rz1BNFtB7aGadMD0MavmzuuXNTaYL6/uiYIs08U7YMPETpgNn5oue3ICr+inKwItOwSsJDYkrE9ekVg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", + "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.4.tgz", - "integrity": "sha512-9+Wxx1i5N/CYo505CTT7T+ix4lVzEdz0uCoYGxM5JDVlP2YdDC1Bdz+Khv6IbqmisT0Si928eAxbmGkcbiuM/A==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", + "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.4.tgz", - "integrity": "sha512-MFsHleM5/rWRW9EivFssop+OulYVUoVcqkyOkjiynKBCGBj9Lihl7kh9IzrreDyXa4sNkquei5/DTP4uCk25xw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", + "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.4.tgz", - "integrity": "sha512-6Xq8SpK46yLvrGxjp6HftkDwPP49puU4OF0hEL4dTxqCbfx09LyrbUj/D7tmIRMj5D5FCUPksBbxyQhp8tmHzw==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", + "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.4.tgz", - "integrity": "sha512-PkIl7Jq4mP6ke7QKwyg4fD4Xvn8PXisagV/+HntWoDEdmerB2LTukRZg728Yd1Fj+LuEX75t/hKXE2Ppk8Hh1w==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", + "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.4.tgz", - "integrity": "sha512-ga676Hnvw7/ycdKB53qPusvsKdwrWzEyJ+AtItHGoARszIqvjffTwaaW3b2L6l90i7MO9i+dlAW415INuRhSGg==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", + "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.4.tgz", - "integrity": "sha512-HP0GDNla1T3ZL8Ko/SHAS2GgtjOg+VmWnnYLhuTksr++EnduYB0f3Y2LzHsUwb2iQ13JGoY6G3R8h6Du/WG6uA==", + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", + "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", "dev": true, "optional": true }, @@ -6599,9 +6597,9 @@ } }, "@lars-reimann/eslint-config": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-5.1.3.tgz", - "integrity": "sha512-Kzw8ksILtRzwXgWAdOuJ+06c5RuuBetqCxj2xIUYohvPSvpXPusuJzoEnXwiQcjCs6MNhaf6ZlmccB7JBe8fMw==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-5.1.4.tgz", + "integrity": "sha512-OtPNeiHJKK/sAAhdiTzd4j2Likv32RxEcxVmC8T0WIXVQKyaUVgr+bJlnxCJ+n9LPx986Ah/8o9Ac8JNmHYm9Q==", "dev": true, "requires": { "eslint-config-airbnb": "^19.0.4", @@ -6696,9 +6694,9 @@ "peer": true }, "@types/node": { - "version": "18.18.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.1.tgz", - "integrity": "sha512-3G42sxmm0fF2+Vtb9TJQpnjmP+uKlWvFa8KoEGquh4gqRmoUG/N0ufuhikw6HEsdG2G2oIKhog1GCTfz9v5NdQ==", + "version": "18.18.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", + "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", "dev": true }, "@types/semver": { @@ -6709,9 +6707,9 @@ "peer": true }, "@types/vscode": { - "version": "1.82.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.82.0.tgz", - "integrity": "sha512-VSHV+VnpF8DEm8LNrn8OJ8VuUNcBzN3tMvKrNpbhhfuVjFm82+6v44AbDhLvVFgCzn6vs94EJNTp7w8S6+Q1Rw==", + "version": "1.83.1", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.83.1.tgz", + "integrity": "sha512-BHu51NaNKOtDf3BOonY3sKFFmZKEpRkzqkZVpSYxowLbs5JqjOQemYFob7Gs5rpxE5tiGhfpnMpcdF/oKrLg4w==", "dev": true }, "@typescript-eslint/eslint-plugin": { @@ -7286,9 +7284,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==" + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==" }, "concat-map": { "version": "0.0.1", @@ -7297,9 +7295,9 @@ "dev": true }, "concurrently": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz", - "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz", + "integrity": "sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -7540,33 +7538,33 @@ } }, "esbuild": { - "version": "0.19.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.4.tgz", - "integrity": "sha512-x7jL0tbRRpv4QUyuDMjONtWFciygUxWaUM1kMX2zWxI0X2YWOt7MSA0g4UdeSiHM8fcYVzpQhKYOycZwxTdZkA==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.19.4", - "@esbuild/android-arm64": "0.19.4", - "@esbuild/android-x64": "0.19.4", - "@esbuild/darwin-arm64": "0.19.4", - "@esbuild/darwin-x64": "0.19.4", - "@esbuild/freebsd-arm64": "0.19.4", - "@esbuild/freebsd-x64": "0.19.4", - "@esbuild/linux-arm": "0.19.4", - "@esbuild/linux-arm64": "0.19.4", - "@esbuild/linux-ia32": "0.19.4", - "@esbuild/linux-loong64": "0.19.4", - "@esbuild/linux-mips64el": "0.19.4", - "@esbuild/linux-ppc64": "0.19.4", - "@esbuild/linux-riscv64": "0.19.4", - "@esbuild/linux-s390x": "0.19.4", - "@esbuild/linux-x64": "0.19.4", - "@esbuild/netbsd-x64": "0.19.4", - "@esbuild/openbsd-x64": "0.19.4", - "@esbuild/sunos-x64": "0.19.4", - "@esbuild/win32-arm64": "0.19.4", - "@esbuild/win32-ia32": "0.19.4", - "@esbuild/win32-x64": "0.19.4" + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", + "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.19.5", + "@esbuild/android-arm64": "0.19.5", + "@esbuild/android-x64": "0.19.5", + "@esbuild/darwin-arm64": "0.19.5", + "@esbuild/darwin-x64": "0.19.5", + "@esbuild/freebsd-arm64": "0.19.5", + "@esbuild/freebsd-x64": "0.19.5", + "@esbuild/linux-arm": "0.19.5", + "@esbuild/linux-arm64": "0.19.5", + "@esbuild/linux-ia32": "0.19.5", + "@esbuild/linux-loong64": "0.19.5", + "@esbuild/linux-mips64el": "0.19.5", + "@esbuild/linux-ppc64": "0.19.5", + "@esbuild/linux-riscv64": "0.19.5", + "@esbuild/linux-s390x": "0.19.5", + "@esbuild/linux-x64": "0.19.5", + "@esbuild/netbsd-x64": "0.19.5", + "@esbuild/openbsd-x64": "0.19.5", + "@esbuild/sunos-x64": "0.19.5", + "@esbuild/win32-arm64": "0.19.5", + "@esbuild/win32-ia32": "0.19.5", + "@esbuild/win32-x64": "0.19.5" } }, "esbuild-plugin-copy": { diff --git a/package.json b/package.json index 477079d07..96c5473a5 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ } ], "engines": { - "vscode": "^1.82.0" + "vscode": "^1.83.0" }, "contributes": { "languages": [ @@ -103,25 +103,23 @@ "dependencies": { "chalk": "^5.3.0", "chevrotain": "^11.0.3", - "commander": "^11.0.0", + "commander": "^11.1.0", "glob": "^10.3.10", "langium": "^2.0.2", "radash": "^11.0.0", "true-myth": "^7.1.0", "vscode-languageclient": "^9.0.1", - "vscode-languageserver": "^9.0.1", - "vscode-languageserver-types": "^3.17.5", - "vscode-uri": "^3.0.7" + "vscode-languageserver": "^9.0.1" }, "devDependencies": { - "@lars-reimann/eslint-config": "^5.1.3", + "@lars-reimann/eslint-config": "^5.1.4", "@lars-reimann/prettier-config": "^5.0.0", - "@types/node": "^18.18.1", - "@types/vscode": "^1.82.0", + "@types/node": "^18.18.6", + "@types/vscode": "^1.83.1", "@vitest/coverage-v8": "^0.34.6", "@vitest/ui": "^0.34.6", - "concurrently": "^8.2.1", - "esbuild": "^0.19.4", + "concurrently": "^8.2.2", + "esbuild": "^0.19.5", "esbuild-plugin-copy": "^2.1.1", "langium-cli": "^2.0.1", "typescript": "^5.2.2", diff --git a/src/language/lsp/safe-ds-document-symbol-provider.ts b/src/language/lsp/safe-ds-document-symbol-provider.ts new file mode 100644 index 000000000..012a93ee8 --- /dev/null +++ b/src/language/lsp/safe-ds-document-symbol-provider.ts @@ -0,0 +1,89 @@ +import { AstNode, DefaultDocumentSymbolProvider, LangiumDocument } from 'langium'; +import { DocumentSymbol, SymbolTag } from 'vscode-languageserver'; +import { SafeDsServices } from '../safe-ds-module.js'; +import { SafeDsAnnotations } from '../builtins/safe-ds-annotations.js'; +import { + isSdsAnnotatedObject, + isSdsAnnotation, + isSdsAttribute, + isSdsClass, + isSdsEnumVariant, + isSdsFunction, + isSdsPipeline, + isSdsSegment, +} from '../generated/ast.js'; +import { SafeDsTypeComputer } from '../typing/safe-ds-type-computer.js'; + +export class SafeDsDocumentSymbolProvider extends DefaultDocumentSymbolProvider { + private readonly builtinAnnotations: SafeDsAnnotations; + private readonly typeComputer: SafeDsTypeComputer; + + constructor(services: SafeDsServices) { + super(services); + + this.builtinAnnotations = services.builtins.Annotations; + this.typeComputer = services.types.TypeComputer; + } + + protected override getSymbol(document: LangiumDocument, node: AstNode): DocumentSymbol[] { + const cstNode = node.$cstNode; + const nameNode = this.nameProvider.getNameNode(node); + if (nameNode && cstNode) { + const name = this.nameProvider.getName(node); + return [ + { + name: name ?? nameNode.text, + kind: this.nodeKindProvider.getSymbolKind(node), + tags: this.getTags(node), + detail: this.getDetails(node), + range: cstNode.range, + selectionRange: nameNode.range, + children: this.getChildSymbols(document, node), + }, + ]; + } else { + return this.getChildSymbols(document, node) || []; + } + } + + protected override getChildSymbols(document: LangiumDocument, node: AstNode): DocumentSymbol[] | undefined { + if (this.isLeaf(node)) { + return undefined; + } else if (isSdsClass(node)) { + if (node.body) { + return super.getChildSymbols(document, node.body); + } else { + return undefined; + } + } else { + return super.getChildSymbols(document, node); + } + } + + private getDetails(node: AstNode): string | undefined { + if (isSdsFunction(node) || isSdsSegment(node)) { + const type = this.typeComputer.computeType(node); + return type?.toString(); + } + return undefined; + } + + private getTags(node: AstNode): SymbolTag[] | undefined { + if (isSdsAnnotatedObject(node) && this.builtinAnnotations.isDeprecated(node)) { + return [SymbolTag.Deprecated]; + } else { + return undefined; + } + } + + private isLeaf(node: AstNode): boolean { + return ( + isSdsAnnotation(node) || + isSdsAttribute(node) || + isSdsEnumVariant(node) || + isSdsFunction(node) || + isSdsPipeline(node) || + isSdsSegment(node) + ); + } +} diff --git a/src/language/lsp/safe-ds-node-kind-provider.ts b/src/language/lsp/safe-ds-node-kind-provider.ts new file mode 100644 index 000000000..e2fc1f86f --- /dev/null +++ b/src/language/lsp/safe-ds-node-kind-provider.ts @@ -0,0 +1,93 @@ +import { AstNode, AstNodeDescription, hasContainerOfType, isAstNode, NodeKindProvider } from 'langium'; +import { CompletionItemKind, SymbolKind } from 'vscode-languageserver'; +import { + isSdsClass, + isSdsFunction, + SdsAnnotation, + SdsAttribute, + SdsBlockLambdaResult, + SdsClass, + SdsEnum, + SdsEnumVariant, + SdsFunction, + SdsModule, + SdsParameter, + SdsPipeline, + SdsPlaceholder, + SdsResult, + SdsSegment, + SdsTypeParameter, +} from '../generated/ast.js'; + +export class SafeDsNodeKindProvider implements NodeKindProvider { + getSymbolKind(nodeOrDescription: AstNode | AstNodeDescription): SymbolKind { + // The WorkspaceSymbolProvider only passes descriptions, where the node might be undefined + const node = this.getNode(nodeOrDescription); + if (isSdsFunction(node) && hasContainerOfType(node, isSdsClass)) { + return SymbolKind.Method; + } + + const type = this.getNodeType(nodeOrDescription); + switch (type) { + case SdsAnnotation: + return SymbolKind.Interface; + case SdsAttribute: + return SymbolKind.Property; + /* c8 ignore next 2 */ + case SdsBlockLambdaResult: + return SymbolKind.Variable; + case SdsClass: + return SymbolKind.Class; + case SdsEnum: + return SymbolKind.Enum; + case SdsEnumVariant: + return SymbolKind.EnumMember; + case SdsFunction: + return SymbolKind.Function; + case SdsModule: + return SymbolKind.Package; + /* c8 ignore next 2 */ + case SdsParameter: + return SymbolKind.Variable; + case SdsPipeline: + return SymbolKind.Function; + /* c8 ignore next 2 */ + case SdsPlaceholder: + return SymbolKind.Variable; + /* c8 ignore next 2 */ + case SdsResult: + return SymbolKind.Variable; + case SdsSegment: + return SymbolKind.Function; + /* c8 ignore next 2 */ + case SdsTypeParameter: + return SymbolKind.TypeParameter; + /* c8 ignore next 2 */ + default: + return SymbolKind.Null; + } + } + + /* c8 ignore start */ + getCompletionItemKind(_nodeOrDescription: AstNode | AstNodeDescription) { + return CompletionItemKind.Reference; + } + + /* c8 ignore stop */ + + private getNode(nodeOrDescription: AstNode | AstNodeDescription): AstNode | undefined { + if (isAstNode(nodeOrDescription)) { + return nodeOrDescription; + } /* c8 ignore start */ else { + return nodeOrDescription.node; + } /* c8 ignore stop */ + } + + private getNodeType(nodeOrDescription: AstNode | AstNodeDescription): string { + if (isAstNode(nodeOrDescription)) { + return nodeOrDescription.$type; + } /* c8 ignore start */ else { + return nodeOrDescription.type; + } /* c8 ignore stop */ + } +} diff --git a/src/language/lsp/safe-ds-semantic-token-provider.ts b/src/language/lsp/safe-ds-semantic-token-provider.ts index d315c77d4..ec729662a 100644 --- a/src/language/lsp/safe-ds-semantic-token-provider.ts +++ b/src/language/lsp/safe-ds-semantic-token-provider.ts @@ -2,9 +2,9 @@ import { AbstractSemanticTokenProvider, AllSemanticTokenTypes, AstNode, + DefaultSemanticTokenOptions, hasContainerOfType, SemanticTokenAcceptor, - DefaultSemanticTokenOptions, } from 'langium'; import { isSdsAnnotation, @@ -29,7 +29,7 @@ import { isSdsTypeParameter, isSdsTypeParameterConstraint, } from '../generated/ast.js'; -import { SemanticTokenModifiers, SemanticTokenTypes } from 'vscode-languageserver-types'; +import { SemanticTokenModifiers, SemanticTokenTypes } from 'vscode-languageserver'; import { SafeDsServices } from '../safe-ds-module.js'; import { SafeDsClasses } from '../builtins/safe-ds-classes.js'; diff --git a/src/language/partialEvaluation/model.ts b/src/language/partialEvaluation/model.ts index ec4c2472d..b0df4352d 100644 --- a/src/language/partialEvaluation/model.ts +++ b/src/language/partialEvaluation/model.ts @@ -371,7 +371,7 @@ class UnknownEvaluatedNodeClass extends EvaluatedNode { } override toString(): string { - return '$unknown'; + return '?'; } } diff --git a/src/language/safe-ds-module.ts b/src/language/safe-ds-module.ts index d88f6d850..17c493b74 100644 --- a/src/language/safe-ds-module.ts +++ b/src/language/safe-ds-module.ts @@ -26,6 +26,8 @@ import { SafeDsPartialEvaluator } from './partialEvaluation/safe-ds-partial-eval import { SafeDsSemanticTokenProvider } from './lsp/safe-ds-semantic-token-provider.js'; import { SafeDsTypeChecker } from './typing/safe-ds-type-checker.js'; import { SafeDsCoreTypes } from './typing/safe-ds-core-types.js'; +import { SafeDsNodeKindProvider } from './lsp/safe-ds-node-kind-provider.js'; +import { SafeDsDocumentSymbolProvider } from './lsp/safe-ds-document-symbol-provider.js'; /** * Declaration of custom services - add your own service classes here. @@ -75,6 +77,7 @@ export const SafeDsModule: Module new SafeDsNodeMapper(services), }, lsp: { + DocumentSymbolProvider: (services) => new SafeDsDocumentSymbolProvider(services), Formatter: () => new SafeDsFormatter(), SemanticTokenProvider: (services) => new SafeDsSemanticTokenProvider(services), }, @@ -99,6 +102,9 @@ export const SafeDsModule: Module> = { + lsp: { + NodeKindProvider: () => new SafeDsNodeKindProvider(), + }, workspace: { WorkspaceManager: (services) => new SafeDsWorkspaceManager(services), }, diff --git a/src/language/typing/model.ts b/src/language/typing/model.ts index 00bcb3702..a6e64d202 100644 --- a/src/language/typing/model.ts +++ b/src/language/typing/model.ts @@ -350,7 +350,7 @@ class UnknownTypeClass extends Type { } toString(): string { - return '$Unknown'; + return '?'; } } diff --git a/src/language/validation/builtins/deprecated.ts b/src/language/validation/builtins/deprecated.ts index 29a314408..2945c10a5 100644 --- a/src/language/validation/builtins/deprecated.ts +++ b/src/language/validation/builtins/deprecated.ts @@ -13,7 +13,7 @@ import { import { SafeDsServices } from '../../safe-ds-module.js'; import { isRequiredParameter } from '../../helpers/nodeProperties.js'; import { parameterCanBeAnnotated } from '../other/declarations/annotationCalls.js'; -import { DiagnosticTag } from 'vscode-languageserver-types'; +import { DiagnosticTag } from 'vscode-languageserver'; export const CODE_DEPRECATED_ASSIGNED_RESULT = 'deprecated/assigned-result'; export const CODE_DEPRECATED_CALLED_ANNOTATION = 'deprecated/called-annotation'; diff --git a/src/language/validation/other/declarations/placeholders.ts b/src/language/validation/other/declarations/placeholders.ts index 2fbf3d462..5c8d3cb3a 100644 --- a/src/language/validation/other/declarations/placeholders.ts +++ b/src/language/validation/other/declarations/placeholders.ts @@ -11,7 +11,7 @@ import { getContainerOfType, ValidationAcceptor } from 'langium'; import { SafeDsServices } from '../../../safe-ds-module.js'; import { statementsOrEmpty } from '../../../helpers/nodeProperties.js'; import { last } from 'radash'; -import { DiagnosticTag } from 'vscode-languageserver-types'; +import { DiagnosticTag } from 'vscode-languageserver'; export const CODE_PLACEHOLDER_ALIAS = 'placeholder/alias'; export const CODE_PLACEHOLDER_UNUSED = 'placeholder/unused'; diff --git a/src/language/validation/other/declarations/segments.ts b/src/language/validation/other/declarations/segments.ts index 0f2ae329f..9cd40d06b 100644 --- a/src/language/validation/other/declarations/segments.ts +++ b/src/language/validation/other/declarations/segments.ts @@ -2,7 +2,7 @@ import { SdsSegment } from '../../../generated/ast.js'; import { ValidationAcceptor } from 'langium'; import { parametersOrEmpty, resultsOrEmpty } from '../../../helpers/nodeProperties.js'; import { SafeDsServices } from '../../../safe-ds-module.js'; -import { DiagnosticTag } from 'vscode-languageserver-types'; +import { DiagnosticTag } from 'vscode-languageserver'; export const CODE_SEGMENT_DUPLICATE_YIELD = 'segment/duplicate-yield'; export const CODE_SEGMENT_UNASSIGNED_RESULT = 'segment/unassigned-result'; diff --git a/tests/helpers/diagnostics.ts b/tests/helpers/diagnostics.ts index 07bc5d3ce..36e7d2fce 100644 --- a/tests/helpers/diagnostics.ts +++ b/tests/helpers/diagnostics.ts @@ -1,6 +1,6 @@ import { parseHelper } from 'langium/test'; import { LangiumServices, URI } from 'langium'; -import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver-types'; +import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver'; import { TestDescriptionError } from './testDescription.js'; let nextId = 0; diff --git a/tests/language/builtins/builtinFilesCorrectness.test.ts b/tests/language/builtins/builtinFilesCorrectness.test.ts index 1cf13ae7d..37b5404e6 100644 --- a/tests/language/builtins/builtinFilesCorrectness.test.ts +++ b/tests/language/builtins/builtinFilesCorrectness.test.ts @@ -3,7 +3,7 @@ import { listBuiltinFiles } from '../../../src/language/builtins/fileFinder.js'; import { uriToShortenedResourceName } from '../../../src/helpers/resources.js'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; import { NodeFileSystem } from 'langium/node'; -import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver-types'; +import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver'; import { isEmpty } from 'radash'; import { URI } from 'langium'; import { locationToString } from '../../helpers/location.js'; diff --git a/tests/language/lsp/formatting/creator.ts b/tests/language/lsp/formatting/creator.ts index db86efa2a..d3a404caf 100644 --- a/tests/language/lsp/formatting/creator.ts +++ b/tests/language/lsp/formatting/creator.ts @@ -1,6 +1,6 @@ import { listTestSafeDsFiles, uriToShortenedTestResourceName } from '../../../helpers/testResources.js'; import fs from 'fs'; -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from 'vscode-languageserver'; import { createSafeDsServices } from '../../../../src/language/safe-ds-module.js'; import { EmptyFileSystem, URI } from 'langium'; import { getSyntaxErrors } from '../../../helpers/diagnostics.js'; diff --git a/tests/language/lsp/safe-ds-document-symbol-provider.test.ts b/tests/language/lsp/safe-ds-document-symbol-provider.test.ts new file mode 100644 index 000000000..af461dcf1 --- /dev/null +++ b/tests/language/lsp/safe-ds-document-symbol-provider.test.ts @@ -0,0 +1,265 @@ +import { afterEach, beforeEach, describe, expect, it } from 'vitest'; +import { clearDocuments, parseDocument, textDocumentParams } from 'langium/test'; +import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; +import { DocumentSymbol, SymbolKind, SymbolTag } from 'vscode-languageserver'; +import { NodeFileSystem } from 'langium/node'; + +const services = createSafeDsServices(NodeFileSystem).SafeDs; +const symbolProvider = services.lsp.DocumentSymbolProvider!; + +describe('SafeDsSemanticTokenProvider', async () => { + beforeEach(async () => { + // Load the builtin library + await services.shared.workspace.WorkspaceManager.initializeWorkspace([]); + }); + + afterEach(async () => { + await clearDocuments(services); + }); + + const testCases: DocumentSymbolProviderTest[] = [ + { + testName: 'annotation declaration', + code: 'annotation A(p: Int)', + expectedSymbols: [ + { + name: 'A', + kind: SymbolKind.Interface, + }, + ], + }, + { + testName: 'attribute declaration', + code: ` + class C { + attr a: Int + static attr b: (p: Int) -> r: Int + } + `, + expectedSymbols: [ + { + name: 'C', + kind: SymbolKind.Class, + children: [ + { + name: 'a', + kind: SymbolKind.Property, + }, + { + name: 'b', + kind: SymbolKind.Property, + }, + ], + }, + ], + }, + { + testName: 'class declaration', + code: 'class C(p: Int)', + expectedSymbols: [ + { + name: 'C', + kind: SymbolKind.Class, + }, + ], + }, + { + testName: 'enum declaration', + code: 'enum E', + expectedSymbols: [ + { + name: 'E', + kind: SymbolKind.Enum, + }, + ], + }, + { + testName: 'enum variant declaration', + code: ` + enum E { + V(p: Int) + } + `, + expectedSymbols: [ + { + name: 'E', + kind: SymbolKind.Enum, + children: [ + { + name: 'V', + kind: SymbolKind.EnumMember, + }, + ], + }, + ], + }, + { + testName: 'function declaration', + code: ` + class C { + fun f(p: Int) -> r: Int + static fun g(p: Int) -> r: Int + } + + fun f(p: Int) -> r: Int + `, + expectedSymbols: [ + { + name: 'C', + kind: SymbolKind.Class, + children: [ + { + name: 'f', + kind: SymbolKind.Method, + detail: '(p: Int) -> (r: Int)', + }, + { + name: 'g', + kind: SymbolKind.Method, + detail: '(p: Int) -> (r: Int)', + }, + ], + }, + { + name: 'f', + kind: SymbolKind.Function, + detail: '(p: Int) -> (r: Int)', + }, + ], + }, + { + testName: 'module', + code: 'package a.b.c', + expectedSymbols: [ + { + name: 'a.b.c', + kind: SymbolKind.Package, + }, + ], + }, + { + testName: 'pipeline declaration', + code: ` + pipeline p { + val a = 1; + + (q: Int) { + yield r = 1; + }; + } + `, + expectedSymbols: [ + { + name: 'p', + kind: SymbolKind.Function, + }, + ], + }, + { + testName: 'segment declaration', + code: ` + segment s(p: Int) -> r: Int { + val a = 1; + + (p: Int) { + yield r = 1; + }; + } + `, + expectedSymbols: [ + { + name: 's', + kind: SymbolKind.Function, + detail: '(p: Int) -> (r: Int)', + }, + ], + }, + { + testName: 'deprecated declaration', + code: ` + package test + + @Deprecated + class C + `, + expectedSymbols: [ + { + name: 'test', + kind: SymbolKind.Package, + children: [ + { + name: 'C', + kind: SymbolKind.Class, + tags: [SymbolTag.Deprecated], + }, + ], + }, + ], + }, + ]; + + it.each(testCases)('should assign the correct symbols ($testName)', async ({ code, expectedSymbols }) => { + await checkDocumentSymbols(code, expectedSymbols); + }); +}); + +const checkDocumentSymbols = async (code: string, expectedSymbols: SimpleDocumentSymbol[]) => { + const document = await parseDocument(services, code); + const symbols = (await symbolProvider.getSymbols(document, textDocumentParams(document))) ?? []; + const simpleSymbols = symbols.map(simplifyDocumentSymbol); + + expect(simpleSymbols).toStrictEqual(expectedSymbols); +}; + +const simplifyDocumentSymbol = (symbol: DocumentSymbol): SimpleDocumentSymbol => { + const result = { + name: symbol.name, + kind: symbol.kind, + tags: symbol.tags, + detail: symbol.detail, + children: symbol.children?.map(simplifyDocumentSymbol), + }; + + if (!result.tags) { + delete result.tags; + } + if (!result.detail) { + delete result.detail; + } + if (!result.children) { + delete result.children; + } + + return result; +}; + +/** + * A description of a test case for the document symbol provider. + */ +interface DocumentSymbolProviderTest { + /** + * A short description of the test case. + */ + testName: string; + + /** + * The code to parse. + */ + code: string; + + /** + * The expected symbols. + */ + expectedSymbols: SimpleDocumentSymbol[]; +} + +/** + * A document symbol without range information. + */ +interface SimpleDocumentSymbol { + name: string; + kind: SymbolKind; + tags?: SymbolTag[]; + detail?: string; + children?: SimpleDocumentSymbol[]; +} diff --git a/tests/language/lsp/safe-ds-semantic-token-provider.test.ts b/tests/language/lsp/safe-ds-semantic-token-provider.test.ts index cf3c694bd..b70b20159 100644 --- a/tests/language/lsp/safe-ds-semantic-token-provider.test.ts +++ b/tests/language/lsp/safe-ds-semantic-token-provider.test.ts @@ -1,7 +1,7 @@ import { afterEach, beforeEach, describe, it } from 'vitest'; import { clearDocuments, highlightHelper } from 'langium/test'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; -import { SemanticTokenTypes } from 'vscode-languageserver-types'; +import { SemanticTokenTypes } from 'vscode-languageserver'; import { AssertionError } from 'assert'; import { NodeFileSystem } from 'langium/node'; diff --git a/tests/language/scoping/testScoping.test.ts b/tests/language/scoping/testScoping.test.ts index 7d31c8119..86a29987d 100644 --- a/tests/language/scoping/testScoping.test.ts +++ b/tests/language/scoping/testScoping.test.ts @@ -1,12 +1,11 @@ import { afterEach, beforeEach, describe, it } from 'vitest'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; -import { URI } from 'vscode-uri'; +import { LangiumDocument, Reference, URI } from 'langium'; import { NodeFileSystem } from 'langium/node'; import { clearDocuments, isRangeEqual } from 'langium/test'; import { AssertionError } from 'assert'; import { isLocationEqual, locationToString } from '../../helpers/location.js'; import { createScopingTests, ExpectedReference } from './creator.js'; -import { LangiumDocument, Reference } from 'langium'; import { Location } from 'vscode-languageserver'; const services = createSafeDsServices(NodeFileSystem).SafeDs; diff --git a/tests/language/validation/creator.ts b/tests/language/validation/creator.ts index 76d370958..2122ca890 100644 --- a/tests/language/validation/creator.ts +++ b/tests/language/validation/creator.ts @@ -7,7 +7,7 @@ import { findTestChecks } from '../../helpers/testChecks.js'; import { getSyntaxErrors, SyntaxErrorsInCodeError } from '../../helpers/diagnostics.js'; import { EmptyFileSystem, URI } from 'langium'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; -import { Range } from 'vscode-languageserver-types'; +import { Range } from 'vscode-languageserver'; import { TestDescription, TestDescriptionError } from '../../helpers/testDescription.js'; const services = createSafeDsServices(EmptyFileSystem).SafeDs; diff --git a/tests/language/validation/testValidation.test.ts b/tests/language/validation/testValidation.test.ts index 371037224..6d342dc07 100644 --- a/tests/language/validation/testValidation.test.ts +++ b/tests/language/validation/testValidation.test.ts @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, it } from 'vitest'; import { createSafeDsServices } from '../../../src/language/safe-ds-module.js'; import { NodeFileSystem } from 'langium/node'; import { createValidationTests, ExpectedIssue } from './creator.js'; -import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver-types'; +import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver'; import { AssertionError } from 'assert'; import { clearDocuments, isRangeEqual } from 'langium/test'; import { locationToString } from '../../helpers/location.js'; diff --git a/tests/resources/partial evaluation/recursive cases/calls/of enum variants/main.sdstest b/tests/resources/partial evaluation/recursive cases/calls/of enum variants/main.sdstest index 0ea9b94d4..131b375a8 100644 --- a/tests/resources/partial evaluation/recursive cases/calls/of enum variants/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/calls/of enum variants/main.sdstest @@ -11,7 +11,7 @@ pipeline test { // $TEST$ serialization MyEnumVariantWithoutParameters() »MyEnum.MyEnumVariantWithoutParameters()«; - // $TEST$ serialization MyEnumVariantWithParameters($unknown, 3) + // $TEST$ serialization MyEnumVariantWithParameters(?, 3) »MyEnum.MyEnumVariantWithParameters()«; // $TEST$ serialization MyEnumVariantWithParameters(1, 3) @@ -23,15 +23,15 @@ pipeline test { // $TEST$ serialization MyEnumVariantWithParameters(1, 2) »MyEnum.MyEnumVariantWithParameters(q = 2, p = 1)«; - // $TEST$ serialization MyEnumVariantWithParameters(1, $unknown) + // $TEST$ serialization MyEnumVariantWithParameters(1, ?) »MyEnum.MyEnumVariantWithParameters(1, f())«; - // $TEST$ serialization MyEnumVariantWithParameters(1, $unknown) + // $TEST$ serialization MyEnumVariantWithParameters(1, ?) »MyEnum.MyEnumVariantWithParameters(1, f(), 3)«; - // $TEST$ serialization MyEnumVariantWithParameters(1, $unknown) + // $TEST$ serialization MyEnumVariantWithParameters(1, ?) »MyEnum.MyEnumVariantWithParameters(1, f(), r = 3)«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »MyEnum.MyEnumVariantWithParameters(q = 2, p = 1)()«; } diff --git a/tests/resources/partial evaluation/recursive cases/calls/unresolved/main.sdstest b/tests/resources/partial evaluation/recursive cases/calls/unresolved/main.sdstest index 96c4c643c..3fd30caf6 100644 --- a/tests/resources/partial evaluation/recursive cases/calls/unresolved/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/calls/unresolved/main.sdstest @@ -5,9 +5,9 @@ enum MyEnum { } pipeline test { - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved.MyEnumVariant()«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »MyEnum.unresolved()«; } diff --git a/tests/resources/partial evaluation/recursive cases/indexed access/on lists/main.sdstest b/tests/resources/partial evaluation/recursive cases/indexed access/on lists/main.sdstest index eb9d06591..eceb9abb1 100644 --- a/tests/resources/partial evaluation/recursive cases/indexed access/on lists/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/indexed access/on lists/main.sdstest @@ -7,18 +7,18 @@ pipeline test { // $TEST$ serialization 1 »[1, 2, unresolved][0]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »[1, 2, unresolved][2]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »[][-1]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »[][1]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »[][""]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »[][unresolved]«; } diff --git a/tests/resources/partial evaluation/recursive cases/indexed access/on maps/main.sdstest b/tests/resources/partial evaluation/recursive cases/indexed access/on maps/main.sdstest index a7d9fc73f..9a2e8d601 100644 --- a/tests/resources/partial evaluation/recursive cases/indexed access/on maps/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/indexed access/on maps/main.sdstest @@ -10,12 +10,12 @@ pipeline test { // $TEST$ serialization 2 »{"1": 1, "2": 2, "3": unresolved}["2"]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »{"1": 1, "2": 2, "3": unresolved}["3"]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »{}[1]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »{}[unresolved]«; } diff --git a/tests/resources/partial evaluation/recursive cases/indexed access/on other/main.sdstest b/tests/resources/partial evaluation/recursive cases/indexed access/on other/main.sdstest index b813c00a7..599dd9672 100644 --- a/tests/resources/partial evaluation/recursive cases/indexed access/on other/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/indexed access/on other/main.sdstest @@ -1,9 +1,9 @@ package tests.partialValidation.recursiveCases.indexedAccess.onOther pipeline test { - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1[1]«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved[1]«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdstest index 48353e16e..f322049f5 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdstest @@ -13,15 +13,15 @@ pipeline test { // $TEST$ serialization true »true and true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 and true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »false and 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved and false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true and unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/divided by/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/divided by/main.sdstest index 757a3dbe5..c04021c29 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/divided by/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/divided by/main.sdstest @@ -14,25 +14,25 @@ pipeline test { »1 / 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 / 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 / 0.0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 / -0.0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true / 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 / true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved / 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 / unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/elvis/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/elvis/main.sdstest index 021a76e83..23a3dc844 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/elvis/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/elvis/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization false »null ?: false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved ?: true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true ?: unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/equals/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/equals/main.sdstest index 96986fcaa..177b74c16 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/equals/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/equals/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization false »false == 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 == unresolved«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved == 1.25«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/greater than or equals/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/greater than or equals/main.sdstest index d949d7375..5f9e3f6b6 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/greater than or equals/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/greater than or equals/main.sdstest @@ -27,15 +27,15 @@ pipeline test { »0 >= 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 >= true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »false >= 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved >= false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true >= unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/greater than/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/greater than/main.sdstest index ec98f8136..de60757fe 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/greater than/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/greater than/main.sdstest @@ -27,15 +27,15 @@ pipeline test { »0 > 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 > true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »false > 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved > false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true > unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/identical to/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/identical to/main.sdstest index 78aaa2cc9..9f6634040 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/identical to/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/identical to/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization false »false === 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 === unresolved«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved === 1.25«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/less than or equals/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/less than or equals/main.sdstest index 0051f66a5..19420212b 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/less than or equals/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/less than or equals/main.sdstest @@ -27,15 +27,15 @@ pipeline test { »1 <= 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 <= true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »false <= 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved <= false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true <= unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/less than/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/less than/main.sdstest index 128e39d3f..c368f2892 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/less than/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/less than/main.sdstest @@ -27,15 +27,15 @@ pipeline test { »1 < 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 < true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »false < 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved < false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true < unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/minus/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/minus/main.sdstest index dfb0dcd1c..1ab3020d2 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/minus/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/minus/main.sdstest @@ -14,15 +14,15 @@ pipeline test { »1 - 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true - 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 - true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved - 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 - unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/not equals/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/not equals/main.sdstest index b81bc2d12..539dbf174 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/not equals/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/not equals/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization true »false != 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 != unresolved«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved != 1.25«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/not identical to/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/not identical to/main.sdstest index 62d94c335..32e217d9e 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/not identical to/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/not identical to/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization true »false !== 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 !== unresolved«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved !== 1.25«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdstest index 433f0bf6c..f6962b2ec 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdstest @@ -13,15 +13,15 @@ pipeline test { // $TEST$ serialization true »true or true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 or true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »false or 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved or false«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true or unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/plus/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/plus/main.sdstest index 23551d74d..0d5b0e7f5 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/plus/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/plus/main.sdstest @@ -14,15 +14,15 @@ pipeline test { »1 + 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true + 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 + true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved + 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 + unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/infix operations/times/main.sdstest b/tests/resources/partial evaluation/recursive cases/infix operations/times/main.sdstest index b23b220e8..1bcac13ff 100644 --- a/tests/resources/partial evaluation/recursive cases/infix operations/times/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/infix operations/times/main.sdstest @@ -14,15 +14,15 @@ pipeline test { »1 * 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »true * 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 * true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved * 1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »1 * unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/lists/main.sdstest b/tests/resources/partial evaluation/recursive cases/lists/main.sdstest index 112029fa0..eb3bf4542 100644 --- a/tests/resources/partial evaluation/recursive cases/lists/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/lists/main.sdstest @@ -4,6 +4,6 @@ pipeline test { // $TEST$ serialization [] »[]«; - // $TEST$ serialization [1, 2.5, null, $unknown] + // $TEST$ serialization [1, 2.5, null, ?] »[1, 2.5, null, unresolved]«; } diff --git a/tests/resources/partial evaluation/recursive cases/maps/main.sdstest b/tests/resources/partial evaluation/recursive cases/maps/main.sdstest index 22e69d284..25c0ef456 100644 --- a/tests/resources/partial evaluation/recursive cases/maps/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/maps/main.sdstest @@ -4,7 +4,7 @@ pipeline test { // $TEST$ serialization {} »{}«; - // $TEST$ serialization {"a": 1, "b": 2.5, "c": null, "d": $unknown, $unknown: true} + // $TEST$ serialization {"a": 1, "b": 2.5, "c": null, "d": ?, ?: true} »{ "a": 1, "b": 2.5, diff --git a/tests/resources/partial evaluation/recursive cases/member accesses/unresolved/main.sdstest b/tests/resources/partial evaluation/recursive cases/member accesses/unresolved/main.sdstest index c57c51313..c5bf09caf 100644 --- a/tests/resources/partial evaluation/recursive cases/member accesses/unresolved/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/member accesses/unresolved/main.sdstest @@ -5,9 +5,9 @@ enum MyEnum { } pipeline test { - // $TEST$ serialization $unknown + // $TEST$ serialization ? »unresolved.MyEnumVariant«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »MyEnum.unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/prefix operations/minus/main.sdstest b/tests/resources/partial evaluation/recursive cases/prefix operations/minus/main.sdstest index 383a0125b..e9bfcc354 100644 --- a/tests/resources/partial evaluation/recursive cases/prefix operations/minus/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/prefix operations/minus/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization -1 »-1«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »-true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »-unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdstest b/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdstest index 3a692a1e1..84c8e97aa 100644 --- a/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdstest @@ -7,9 +7,9 @@ pipeline test { // $TEST$ serialization false »not true«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »not 0«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »not unresolved«; } diff --git a/tests/resources/partial evaluation/recursive cases/template strings/main.sdstest b/tests/resources/partial evaluation/recursive cases/template strings/main.sdstest index 88f5e306c..c5797e0af 100644 --- a/tests/resources/partial evaluation/recursive cases/template strings/main.sdstest +++ b/tests/resources/partial evaluation/recursive cases/template strings/main.sdstest @@ -7,6 +7,6 @@ pipeline test { // $TEST$ serialization "start 1 inner1 true inner2 test end " »"start\t{{ 1 }} inner1\t{{ true }} inner2\t{{ "test" }} end\t"«; - // $TEST$ serialization $unknown + // $TEST$ serialization ? »"start {{ call() }} end"«; } diff --git a/tests/resources/typing/assignees/block lambda results/main.sdstest b/tests/resources/typing/assignees/block lambda results/main.sdstest index 33592645e..871afb67f 100644 --- a/tests/resources/typing/assignees/block lambda results/main.sdstest +++ b/tests/resources/typing/assignees/block lambda results/main.sdstest @@ -11,7 +11,7 @@ segment mySegment() -> (r: Int) { () { // $TEST$ serialization literal<1> - // $TEST$ serialization $Unknown + // $TEST$ serialization ? yield »r«, yield »s« = 1; }; diff --git a/tests/resources/typing/assignees/placeholders/main.sdstest b/tests/resources/typing/assignees/placeholders/main.sdstest index 687534249..3ba738ab6 100644 --- a/tests/resources/typing/assignees/placeholders/main.sdstest +++ b/tests/resources/typing/assignees/placeholders/main.sdstest @@ -10,7 +10,7 @@ segment mySegment1() -> (r: Int) { segment mySegment2() -> (r: Int, s: String) { // $TEST$ serialization literal<1> - // $TEST$ serialization $Unknown + // $TEST$ serialization ? val »r«, val »s« = 1; } diff --git a/tests/resources/typing/assignees/yields/main.sdstest b/tests/resources/typing/assignees/yields/main.sdstest index 7569c7e32..dbe2de364 100644 --- a/tests/resources/typing/assignees/yields/main.sdstest +++ b/tests/resources/typing/assignees/yields/main.sdstest @@ -10,7 +10,7 @@ segment mySegment1() -> (r: Int) { segment mySegment2() -> (r: Int, s: String) { // $TEST$ serialization literal<1> - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »yield r«, »yield s« = 1; } diff --git a/tests/resources/typing/declarations/annotations/main.sdstest b/tests/resources/typing/declarations/annotations/main.sdstest index 2c3c7a752..e9529989a 100644 --- a/tests/resources/typing/declarations/annotations/main.sdstest +++ b/tests/resources/typing/declarations/annotations/main.sdstest @@ -6,5 +6,5 @@ annotation »myAnnotation1« // $TEST$ serialization (p1: Int, p2: String) -> () annotation »myAnnotation3«(p1: Int, p2: String) -// $TEST$ serialization (p1: $Unknown) -> () +// $TEST$ serialization (p1: ?) -> () annotation »myAnnotation5«(p1) diff --git a/tests/resources/typing/declarations/attributes/main.sdstest b/tests/resources/typing/declarations/attributes/main.sdstest index 48c8c0a1f..d17f4f855 100644 --- a/tests/resources/typing/declarations/attributes/main.sdstest +++ b/tests/resources/typing/declarations/attributes/main.sdstest @@ -1,14 +1,14 @@ package tests.typing.declarations.attributes class C { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? attr »a« // $TEST$ equivalence_class instanceAttribute // $TEST$ equivalence_class instanceAttribute attr »b«: »Int« - // $TEST$ serialization $Unknown + // $TEST$ serialization ? static attr »c« // $TEST$ equivalence_class staticAttribute diff --git a/tests/resources/typing/declarations/functions/main.sdstest b/tests/resources/typing/declarations/functions/main.sdstest index 7b4c02a25..f3125cbd9 100644 --- a/tests/resources/typing/declarations/functions/main.sdstest +++ b/tests/resources/typing/declarations/functions/main.sdstest @@ -12,5 +12,5 @@ fun »myFunction3«(p1: Int, p2: String) // $TEST$ serialization (p1: Int, p2: String) -> (r1: Int, r2: String) fun »myFunction4«(p1: Int, p2: String) -> (r1: Int, r2: String) -// $TEST$ serialization (p1: $Unknown) -> (r1: $Unknown) +// $TEST$ serialization (p1: ?) -> (r1: ?) fun »myFunction5«(p1) -> (r1) diff --git a/tests/resources/typing/declarations/parameters/of annotations/main.sdstest b/tests/resources/typing/declarations/parameters/of annotations/main.sdstest index 7b408d03b..55e75d847 100644 --- a/tests/resources/typing/declarations/parameters/of annotations/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of annotations/main.sdstest @@ -4,5 +4,5 @@ package tests.typing.declarations.parameters.ofAnnotations // $TEST$ equivalence_class parameterType annotation MyAnnotation1(»p«: »Int«) -// $TEST$ serialization $Unknown +// $TEST$ serialization ? annotation MyAnnotation2(»p«) diff --git a/tests/resources/typing/declarations/parameters/of block lambdas/that are isolated/main.sdstest b/tests/resources/typing/declarations/parameters/of block lambdas/that are isolated/main.sdstest index 61eec4d3b..2e9dcf7c5 100644 --- a/tests/resources/typing/declarations/parameters/of block lambdas/that are isolated/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of block lambdas/that are isolated/main.sdstest @@ -1,6 +1,6 @@ package tests.typing.declarations.parameters.ofBlockLambdas.thatAreIsolated segment mySegment() { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? (»p«) {}; } diff --git a/tests/resources/typing/declarations/parameters/of block lambdas/that are passed as arguments/main.sdstest b/tests/resources/typing/declarations/parameters/of block lambdas/that are passed as arguments/main.sdstest index cefbb0890..f76cd54bc 100644 --- a/tests/resources/typing/declarations/parameters/of block lambdas/that are passed as arguments/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of block lambdas/that are passed as arguments/main.sdstest @@ -12,15 +12,15 @@ segment mySegment() { // $TEST$ equivalence_class parameterType1 higherOrderFunction1(param = (»p«) {}); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? higherOrderFunction2((»p«) {}); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? higherOrderFunction2(param = (»p«) {}); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? normalFunction((»p«) {}); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? normalFunction(param = (»p«) {}); } diff --git a/tests/resources/typing/declarations/parameters/of block lambdas/that are yielded/main.sdstest b/tests/resources/typing/declarations/parameters/of block lambdas/that are yielded/main.sdstest index db4505d1b..c37f96dd1 100644 --- a/tests/resources/typing/declarations/parameters/of block lambdas/that are yielded/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of block lambdas/that are yielded/main.sdstest @@ -9,9 +9,9 @@ segment mySegment() -> ( // $TEST$ equivalence_class parameterType2 yield r = (»p«) {}; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? yield s = (»p«) {}; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? yield t = (»p«) {}; } diff --git a/tests/resources/typing/declarations/parameters/of callable types/main.sdstest b/tests/resources/typing/declarations/parameters/of callable types/main.sdstest index 486ca65c8..53ae744a3 100644 --- a/tests/resources/typing/declarations/parameters/of callable types/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of callable types/main.sdstest @@ -4,5 +4,5 @@ package tests.typing.declarations.parameters.ofCallableTypes // $TEST$ equivalence_class parameterType annotation MyAnnotation1(f: (»p«: »Int«) -> ()) -// $TEST$ serialization $Unknown +// $TEST$ serialization ? annotation MyAnnotation2(f: (»p«) -> ()) diff --git a/tests/resources/typing/declarations/parameters/of classes/main.sdstest b/tests/resources/typing/declarations/parameters/of classes/main.sdstest index 84616dbcb..27bedb4f2 100644 --- a/tests/resources/typing/declarations/parameters/of classes/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of classes/main.sdstest @@ -4,5 +4,5 @@ package tests.typing.declarations.parameters.ofClasses // $TEST$ equivalence_class parameterType class MyClass1(»p«: »Int«) -// $TEST$ serialization $Unknown +// $TEST$ serialization ? class MyClass2(»p«) diff --git a/tests/resources/typing/declarations/parameters/of enum variants/main.sdstest b/tests/resources/typing/declarations/parameters/of enum variants/main.sdstest index f670c3a49..aaaef607c 100644 --- a/tests/resources/typing/declarations/parameters/of enum variants/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of enum variants/main.sdstest @@ -5,6 +5,6 @@ enum MyEnum { // $TEST$ equivalence_class parameterType MyEnumVariant1(»p«: »Int«) - // $TEST$ serialization $Unknown + // $TEST$ serialization ? MyEnumVariant2(»p«) } diff --git a/tests/resources/typing/declarations/parameters/of expression lambdas/that are isolated/main.sdstest b/tests/resources/typing/declarations/parameters/of expression lambdas/that are isolated/main.sdstest index d12082b7d..8fd19ecc7 100644 --- a/tests/resources/typing/declarations/parameters/of expression lambdas/that are isolated/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of expression lambdas/that are isolated/main.sdstest @@ -1,6 +1,6 @@ package tests.typing.declarations.parameters.ofExpressionLambdas.thatAreIsolated segment mySegment() { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? (»p«) -> 1; } diff --git a/tests/resources/typing/declarations/parameters/of expression lambdas/that are passed as arguments/main.sdstest b/tests/resources/typing/declarations/parameters/of expression lambdas/that are passed as arguments/main.sdstest index 6f9f2bdfa..b2ea8d897 100644 --- a/tests/resources/typing/declarations/parameters/of expression lambdas/that are passed as arguments/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of expression lambdas/that are passed as arguments/main.sdstest @@ -12,15 +12,15 @@ segment mySegment() { // $TEST$ equivalence_class parameterType1 higherOrderFunction1(param = (»p«) -> ""); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? higherOrderFunction2((»p«) -> ""); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? higherOrderFunction2(param = (»p«) -> ""); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? normalFunction((»p«) -> ""); - // $TEST$ serialization $Unknown + // $TEST$ serialization ? normalFunction(param = (»p«) -> ""); } diff --git a/tests/resources/typing/declarations/parameters/of expression lambdas/that are yielded/main.sdstest b/tests/resources/typing/declarations/parameters/of expression lambdas/that are yielded/main.sdstest index 101ef3c25..97fb32438 100644 --- a/tests/resources/typing/declarations/parameters/of expression lambdas/that are yielded/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of expression lambdas/that are yielded/main.sdstest @@ -9,9 +9,9 @@ segment mySegment() -> ( // $TEST$ equivalence_class parameterType2 yield r = (»p«) -> true; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? yield s = (»p«) -> true; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? yield t = (»p«) -> true; } diff --git a/tests/resources/typing/declarations/parameters/of functions/main.sdstest b/tests/resources/typing/declarations/parameters/of functions/main.sdstest index 512a718a5..142e3ff75 100644 --- a/tests/resources/typing/declarations/parameters/of functions/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of functions/main.sdstest @@ -4,5 +4,5 @@ package tests.typing.declarations.parameters.ofFunctions // $TEST$ equivalence_class parameterType fun myFunction1(»p«: »Int«) -// $TEST$ serialization $Unknown +// $TEST$ serialization ? fun myFunction2(»p«) diff --git a/tests/resources/typing/declarations/parameters/of segments/main.sdstest b/tests/resources/typing/declarations/parameters/of segments/main.sdstest index 3fa6f9735..1a1cdf974 100644 --- a/tests/resources/typing/declarations/parameters/of segments/main.sdstest +++ b/tests/resources/typing/declarations/parameters/of segments/main.sdstest @@ -4,5 +4,5 @@ package tests.typing.declarations.parameters.ofSegments // $TEST$ equivalence_class parameterType segment mySegment1(»p«: »Int«) {} -// $TEST$ serialization $Unknown +// $TEST$ serialization ? segment mySegment2(»p«) {} diff --git a/tests/resources/typing/declarations/pipelines/main.sdstest b/tests/resources/typing/declarations/pipelines/main.sdstest index b971899a6..4d60c2fc2 100644 --- a/tests/resources/typing/declarations/pipelines/main.sdstest +++ b/tests/resources/typing/declarations/pipelines/main.sdstest @@ -1,4 +1,4 @@ package tests.typing.declarations.pipelines -// $TEST$ serialization $Unknown +// $TEST$ serialization ? pipeline »myPipeline« {} diff --git a/tests/resources/typing/declarations/segments/main.sdstest b/tests/resources/typing/declarations/segments/main.sdstest index 7c1d4b10b..91b152277 100644 --- a/tests/resources/typing/declarations/segments/main.sdstest +++ b/tests/resources/typing/declarations/segments/main.sdstest @@ -12,5 +12,5 @@ segment »mySegment3«(p1: Int, p2: String) {} // $TEST$ serialization (p1: Int, p2: String) -> (r1: Int, r2: String) segment »mySegment4«(p1: Int, p2: String) -> (r1: Int, r2: String) {} -// $TEST$ serialization (p1: $Unknown) -> (r1: $Unknown) +// $TEST$ serialization (p1: ?) -> (r1: ?) segment »mySegment5«(p1) -> (r1) {} diff --git a/tests/resources/typing/expressions/block lambdas/that are isolated/main.sdstest b/tests/resources/typing/expressions/block lambdas/that are isolated/main.sdstest index 34a938fd6..7aa17b948 100644 --- a/tests/resources/typing/expressions/block lambdas/that are isolated/main.sdstest +++ b/tests/resources/typing/expressions/block lambdas/that are isolated/main.sdstest @@ -3,12 +3,12 @@ package tests.typing.expressions.blockLambdas.thatAreIsolated fun g() -> r: Int segment mySegment() { - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: ?) »(p) { yield r, yield s = 1; }«; - // $TEST$ serialization (p: $Unknown) -> (r: Int, s: $Unknown) + // $TEST$ serialization (p: ?) -> (r: Int, s: ?) val f = »(p) { yield r, yield s = g(); }«; diff --git a/tests/resources/typing/expressions/block lambdas/that are passed as arguments/main.sdstest b/tests/resources/typing/expressions/block lambdas/that are passed as arguments/main.sdstest index 9106d5425..630df41f3 100644 --- a/tests/resources/typing/expressions/block lambdas/that are passed as arguments/main.sdstest +++ b/tests/resources/typing/expressions/block lambdas/that are passed as arguments/main.sdstest @@ -12,34 +12,34 @@ segment mySegment() { yield s = ""; }«); - // $TEST$ serialization (p: String) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: String) -> (r: literal<1>, s: ?) higherOrderFunction1(param = »(p) { yield r, yield s = 1; }«); - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: literal<"">) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: literal<"">) higherOrderFunction2(»(p) { yield r = 1; yield s = ""; }«); - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: ?) higherOrderFunction2(param = »(p) { yield r, yield s = 1; }«); - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: literal<"">) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: literal<"">) normalFunction(»(p) { yield r = 1; yield s = ""; }«); - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: ?) normalFunction(param = »(p) { yield r, yield s = 1; }«); - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: ?) parameterlessFunction(»(p) { yield r, yield s = 1; }«); diff --git a/tests/resources/typing/expressions/block lambdas/that are yielded/main.sdstest b/tests/resources/typing/expressions/block lambdas/that are yielded/main.sdstest index 47c55a95e..5d551ff3b 100644 --- a/tests/resources/typing/expressions/block lambdas/that are yielded/main.sdstest +++ b/tests/resources/typing/expressions/block lambdas/that are yielded/main.sdstest @@ -11,13 +11,13 @@ segment mySegment() -> ( yield s = ""; }«; - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: literal<"">) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: literal<"">) yield s = »(p) { yield r = 1; yield s = ""; }«; - // $TEST$ serialization (p: $Unknown) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: ?) -> (r: literal<1>, s: ?) yield t = »(p) { yield r, yield s = 1; }«; diff --git a/tests/resources/typing/expressions/block lambdas/with manifest types/main.sdstest b/tests/resources/typing/expressions/block lambdas/with manifest types/main.sdstest index a1dadf861..d9383de26 100644 --- a/tests/resources/typing/expressions/block lambdas/with manifest types/main.sdstest +++ b/tests/resources/typing/expressions/block lambdas/with manifest types/main.sdstest @@ -7,7 +7,7 @@ segment mySegment() { yield s = ""; }«; - // $TEST$ serialization (p: String) -> (r: literal<1>, s: $Unknown) + // $TEST$ serialization (p: String) -> (r: literal<1>, s: ?) »(p: String) { yield r, yield s = 1; }«; diff --git a/tests/resources/typing/expressions/calls/of annotations/main.sdstest b/tests/resources/typing/expressions/calls/of annotations/main.sdstest index a5f06c078..a585e6f58 100644 --- a/tests/resources/typing/expressions/calls/of annotations/main.sdstest +++ b/tests/resources/typing/expressions/calls/of annotations/main.sdstest @@ -3,6 +3,6 @@ package tests.typing.expressions.calls.ofAnnotations annotation MyAnnotation pipeline myPipeline { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »MyAnnotation()«; } diff --git a/tests/resources/typing/expressions/calls/of classes/main.sdstest b/tests/resources/typing/expressions/calls/of classes/main.sdstest index c38dbc76d..b96205278 100644 --- a/tests/resources/typing/expressions/calls/of classes/main.sdstest +++ b/tests/resources/typing/expressions/calls/of classes/main.sdstest @@ -6,6 +6,6 @@ pipeline myPipeline { // $TEST$ serialization C »C()«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »C()()«; } diff --git a/tests/resources/typing/expressions/calls/of enum variants/main.sdstest b/tests/resources/typing/expressions/calls/of enum variants/main.sdstest index dbfa49218..7ed609fcd 100644 --- a/tests/resources/typing/expressions/calls/of enum variants/main.sdstest +++ b/tests/resources/typing/expressions/calls/of enum variants/main.sdstest @@ -10,7 +10,7 @@ pipeline myPipeline { // $TEST$ serialization MyEnumVariantWithoutParameterList »MyEnum.MyEnumVariantWithoutParameterList()«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? val alias1 = MyEnum.MyEnumVariantWithoutParameterList; »alias1()«; @@ -18,14 +18,14 @@ pipeline myPipeline { // $TEST$ serialization MyEnumVariantWithoutParameters »MyEnum.MyEnumVariantWithoutParameters()«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? val alias2 = MyEnum.MyEnumVariantWithoutParameters; »alias2()«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »MyEnum.MyEnumVariantWithoutParameters()()«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? val alias3 = MyEnum.MyEnumVariantWithoutParameters(); »alias3()«; @@ -38,10 +38,10 @@ pipeline myPipeline { »alias4(1)«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »MyEnum.MyEnumVariantWithParameters(1)()«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? val alias5 = MyEnum.MyEnumVariantWithParameters(1); »alias5()«; } diff --git a/tests/resources/typing/expressions/calls/of non-callable/main.sdstest b/tests/resources/typing/expressions/calls/of non-callable/main.sdstest index 373cefb48..ffa49ff51 100644 --- a/tests/resources/typing/expressions/calls/of non-callable/main.sdstest +++ b/tests/resources/typing/expressions/calls/of non-callable/main.sdstest @@ -3,6 +3,6 @@ package tests.typing.expressions.calls.ofNonCallables enum MyEnum pipeline myPipeline { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »MyEnum()«; } diff --git a/tests/resources/typing/expressions/calls/unresolved/main.sdstest b/tests/resources/typing/expressions/calls/unresolved/main.sdstest index a88fb7f02..e24d59c47 100644 --- a/tests/resources/typing/expressions/calls/unresolved/main.sdstest +++ b/tests/resources/typing/expressions/calls/unresolved/main.sdstest @@ -1,6 +1,6 @@ package tests.typing.expressions.calls.ofUnresolved pipeline myPipeline { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »unresolved()«; } diff --git a/tests/resources/typing/expressions/expression lambdas/that are isolated/main.sdstest b/tests/resources/typing/expressions/expression lambdas/that are isolated/main.sdstest index b182a388d..05e4f82ca 100644 --- a/tests/resources/typing/expressions/expression lambdas/that are isolated/main.sdstest +++ b/tests/resources/typing/expressions/expression lambdas/that are isolated/main.sdstest @@ -3,9 +3,9 @@ package tests.typing.expressions.expressionLambdas.thatAreIsolated fun g() -> r: Int segment mySegment() { - // $TEST$ serialization (p: $Unknown) -> (result: Int) + // $TEST$ serialization (p: ?) -> (result: Int) »(p) -> g()«; - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) val f = »(p) -> 1«; } diff --git a/tests/resources/typing/expressions/expression lambdas/that are passed as arguments/main.sdstest b/tests/resources/typing/expressions/expression lambdas/that are passed as arguments/main.sdstest index a1f1313e7..1be90b44e 100644 --- a/tests/resources/typing/expressions/expression lambdas/that are passed as arguments/main.sdstest +++ b/tests/resources/typing/expressions/expression lambdas/that are passed as arguments/main.sdstest @@ -12,18 +12,18 @@ segment mySegment() { // $TEST$ serialization (p: String) -> (result: literal<1>) higherOrderFunction1(param = »(p) -> 1«); - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) higherOrderFunction2(»(p) -> 1«); - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) higherOrderFunction2(param = »(p) -> 1«); - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) normalFunction(»(p) -> 1«); - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) normalFunction(param = »(p) -> 1«); - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) parameterlessFunction(»(p) -> 1«); } diff --git a/tests/resources/typing/expressions/expression lambdas/that are yielded/main.sdstest b/tests/resources/typing/expressions/expression lambdas/that are yielded/main.sdstest index 853e2bd66..12d28d349 100644 --- a/tests/resources/typing/expressions/expression lambdas/that are yielded/main.sdstest +++ b/tests/resources/typing/expressions/expression lambdas/that are yielded/main.sdstest @@ -8,9 +8,9 @@ segment mySegment() -> ( // $TEST$ serialization (p: String) -> (result: literal<1>) yield r = »(p) -> 1«; - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) yield s = »(p) -> 1«; - // $TEST$ serialization (p: $Unknown) -> (result: literal<1>) + // $TEST$ serialization (p: ?) -> (result: literal<1>) yield t = »(p) -> 1«; } diff --git a/tests/resources/typing/expressions/indexed accesses/main.sdstest b/tests/resources/typing/expressions/indexed accesses/main.sdstest index 5ac2b4c3b..1e4622183 100644 --- a/tests/resources/typing/expressions/indexed accesses/main.sdstest +++ b/tests/resources/typing/expressions/indexed accesses/main.sdstest @@ -13,11 +13,11 @@ segment mySegment2(param: Map) { } segment mySegment3(param: String) { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »param[0]«; } segment mySegment4() { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »unresolved[0]«; } diff --git a/tests/resources/typing/expressions/member accesses/unresolved/main.sdstest b/tests/resources/typing/expressions/member accesses/unresolved/main.sdstest index 60aa0b8f2..6634f7127 100644 --- a/tests/resources/typing/expressions/member accesses/unresolved/main.sdstest +++ b/tests/resources/typing/expressions/member accesses/unresolved/main.sdstest @@ -3,9 +3,9 @@ package tests.typing.expressions.memberAccesses.unresolved class C pipeline myPipeline { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »C.unresolved«; - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »C?.unresolved«; } diff --git a/tests/resources/typing/expressions/references/unresolved/main.sdstest b/tests/resources/typing/expressions/references/unresolved/main.sdstest index 7d51fa351..6e2046eb8 100644 --- a/tests/resources/typing/expressions/references/unresolved/main.sdstest +++ b/tests/resources/typing/expressions/references/unresolved/main.sdstest @@ -1,6 +1,6 @@ package tests.typing.expressions.references.unresolved pipeline myPipeline { - // $TEST$ serialization $Unknown + // $TEST$ serialization ? »unresolved«; } diff --git a/tests/resources/typing/types/callable types/main.sdstest b/tests/resources/typing/types/callable types/main.sdstest index d38058e65..699f98941 100644 --- a/tests/resources/typing/types/callable types/main.sdstest +++ b/tests/resources/typing/types/callable types/main.sdstest @@ -12,5 +12,5 @@ fun myFunction3(f: »(p1: Int, p2: String) -> ()«) // $TEST$ serialization (p1: Int, p2: String) -> (r1: Int, r2: String) fun myFunction4(f: »(p1: Int, p2: String) -> (r1: Int, r2: String)«) -// $TEST$ serialization (p1: $Unknown) -> (r1: $Unknown) +// $TEST$ serialization (p1: ?) -> (r1: ?) fun myFunction5(f: »(p1) -> (r1)«) diff --git a/tests/resources/typing/types/member types/main.sdstest b/tests/resources/typing/types/member types/main.sdstest index 637055d12..426c79e62 100644 --- a/tests/resources/typing/types/member types/main.sdstest +++ b/tests/resources/typing/types/member types/main.sdstest @@ -20,7 +20,7 @@ fun nonNullableMemberTypes( b: »MyClass.MyNestedEnum«, // $TEST$ equivalence_class myEnumVariant d: »MyEnum.MyEnumVariant«, - // $TEST$ serialization $Unknown + // $TEST$ serialization ? e: »MyEnum.unresolved«, ) @@ -31,6 +31,6 @@ fun nullableMemberTypes( b: »MyClass.MyNestedEnum?«, // $TEST$ serialization MyEnumVariant? d: »MyEnum.MyEnumVariant?«, - // $TEST$ serialization $Unknown + // $TEST$ serialization ? e: »MyEnum.unresolved?«, ) diff --git a/tests/resources/typing/types/named types/main.sdstest b/tests/resources/typing/types/named types/main.sdstest index 7447e4fcd..127afa8d4 100644 --- a/tests/resources/typing/types/named types/main.sdstest +++ b/tests/resources/typing/types/named types/main.sdstest @@ -9,7 +9,7 @@ fun nonNullableNamedTypes( a: »MyClass«, // $TEST$ serialization MyEnum b: »MyEnum«, - // $TEST$ serialization $Unknown + // $TEST$ serialization ? c: »unresolved«, ) @@ -18,6 +18,6 @@ fun nullableNamedTypes( a: »MyClass?«, // $TEST$ serialization MyEnum? b: »MyEnum?«, - // $TEST$ serialization $Unknown + // $TEST$ serialization ? c: »unresolved?«, ) diff --git a/tests/resources/typing/types/type arguments/main.sdstest b/tests/resources/typing/types/type arguments/main.sdstest index 61b3ddefa..c4eada772 100644 --- a/tests/resources/typing/types/type arguments/main.sdstest +++ b/tests/resources/typing/types/type arguments/main.sdstest @@ -22,8 +22,8 @@ fun myFunction( // $TEST$ serialization Boolean f: unresolved<»T = Boolean«>, - // $TEST$ serialization $Unknown + // $TEST$ serialization ? g: MyClass<»unresolved«>, - // $TEST$ serialization $Unknown + // $TEST$ serialization ? h: MyClass<»T = unresolved«>, )