From 214642aa006a5874747071e89f76bd82ce3e8f17 Mon Sep 17 00:00:00 2001 From: sungshik <16154899+sungshik@users.noreply.github.com> Date: Fri, 27 Dec 2024 12:28:02 +0100 Subject: [PATCH] Update to `rascal` 0.40.17 and `rascal-lsp` 2.21.0 (0.12.0) --- examples/pico-dsl-extension/package.json | 2 +- examples/pico-dsl-extension/src/extension.ts | 16 ++++++++-------- examples/pico-dsl-lsp/pom.xml | 5 ++--- .../src/main/rascal/lang/pico/LanguageServer.rsc | 8 ++++---- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/examples/pico-dsl-extension/package.json b/examples/pico-dsl-extension/package.json index 64be61f43..99173ed0d 100644 --- a/examples/pico-dsl-extension/package.json +++ b/examples/pico-dsl-extension/package.json @@ -56,6 +56,6 @@ "webpack-cli": "^4.10.0" }, "dependencies": { - "@usethesource/rascal-vscode-dsl-lsp-server": "0.5.8" + "@usethesource/rascal-vscode-dsl-lsp-server": "0.12.0" } } diff --git a/examples/pico-dsl-extension/src/extension.ts b/examples/pico-dsl-extension/src/extension.ts index 0184a6884..87e2a1060 100644 --- a/examples/pico-dsl-extension/src/extension.ts +++ b/examples/pico-dsl-extension/src/extension.ts @@ -7,19 +7,19 @@ export function activate(context: vscode.ExtensionContext) { const picoLSPJar = `|jar+file://${context.extensionUri.path}/assets/jars/pico-lsp.jar!|`; const language = { pathConfig: `pathConfig(srcs=[${picoLSPJar}])`, - name: "Pico", - extension: "pico", - mainModule: "lang::pico::LanguageServer", + name: "Pico", + extensions: ["pico"], + mainModule: "lang::pico::LanguageServer", mainFunction: "picoContributions" }; console.log(language); // rascal vscode needs an instance of this class, if you register multiple languages, they can share this vfs instance - const vfs = new VSCodeUriResolverServer(false); + const vfs = new VSCodeUriResolverServer(false); // this starts the LSP server and connects it to rascal - const lsp = new ParameterizedLanguageServer(context, - vfs, - calcJarPath(context), - true, + const lsp = new ParameterizedLanguageServer(context, + vfs, + calcJarPath(context), + true, "pico", // vscode language ID "Pico", // vscode language Title (visible in the right bottom corner) language); diff --git a/examples/pico-dsl-lsp/pom.xml b/examples/pico-dsl-lsp/pom.xml index ac9d69939..747043aeb 100644 --- a/examples/pico-dsl-lsp/pom.xml +++ b/examples/pico-dsl-lsp/pom.xml @@ -29,12 +29,12 @@ org.rascalmpl rascal - 0.28.3 + 0.40.17 org.rascalmpl rascal-lsp - 2.12.1 + 2.21.0 org.rascalmpl @@ -96,4 +96,3 @@ - diff --git a/examples/pico-dsl-lsp/src/main/rascal/lang/pico/LanguageServer.rsc b/examples/pico-dsl-lsp/src/main/rascal/lang/pico/LanguageServer.rsc index 5dc520758..c0bd6eeec 100644 --- a/examples/pico-dsl-lsp/src/main/rascal/lang/pico/LanguageServer.rsc +++ b/examples/pico-dsl-lsp/src/main/rascal/lang/pico/LanguageServer.rsc @@ -10,9 +10,9 @@ import IO; // a minimal implementation of a DSL in rascal // users can add support for more advanced features set[LanguageService] picoContributions() = { - parser(parser(#start[Program])), // register the parser function for the Pico language - outliner(picoOutliner), - summarizer(picoSummarizer, providesImplementations = false) + parsing(parser(#start[Program])), // register the parser function for the Pico language + documentSymbol(picoOutliner), + analysis(picoSummarizer, providesImplementations = false) }; @@ -46,7 +46,7 @@ int main() { language( pathConfig(srcs=[|project://pico-dsl-lsp/src/main/rascal|]), "Pico", // name of the language - "pico", // extension + {"pico"}, // extension "lang::pico::LanguageServer", // module to import "picoContributions" )