Rider plugin for a fictional programming language
Language is pretty simple but includes all the basic constructions such as loops, functions, procedures, arrays, strings, pattern matching.
fun fib (n) local r {
if n <= 1
then result := 1
else
fib (n-1);
r := result;
fib (n-2);
result := result + r
fi
}
n := read();
fib(n);
write (result)
fun sum (x) {
case x of
`nil -> return 0
| `cons (x, tl) -> return x + sum (tl)
esac
}
x := read ();
write (sum (`cons (100, `cons (200, `nil))))
fun sort (x) local i, j, y, n {
n := x.length;
if n == 0 then return x fi;
for i := 0, i<n, i := i+1 do
for j := i+1, j<n, j := j+1 do
if x[j] < x[i] then
y := x[i];
x[i] := x[j];
x[j] := y
fi
od
od;
return x
}
n := read ();
x := [10, 9, 8, 7, 6, 5];
x := sort (x);
for i:=0, i<x.length, i:=i+1 do
write (x[i])
od
- IntelliJ IDEA
- JetBrains Rider or a different .NET IDE
-
Install SDK and prepare backend plugin build using Gradle
-
if using IntelliJ IDEA:
Open the
rider-spring
project in IntelliJ IDEA. When suggested to import Gradle projects, accept the suggestion: Gradle will download Rider SDK and set up all necessary dependencies.rider-spring
uses the gradle-intellij-plugin Gradle plugin that downloads the IntelliJ Platform SDK, packs the plugin and installs it into a sandboxed IDE or its test shell, which allows testing the plugin in a separate environment.Open the Gradle tool window in IntelliJ IDEA (View | Tool Windows | Gradle), and execute the
rider-spring/prepare
task. -
if using Gradle command line:
$ cd ./rider-spring $ ./gradlew prepare
-
-
Open
Spring.sln
solution and build using theDebug
configuration. The output assemblies are later copied to the frontend plugin directories by Gradle. (If you're seeing build errors in Rider, choose File | Settings | Build, Execution, Deployment | Toolset and Build, and in the Use MSBuild version drop-down, make sure that Rider uses MSBuild shipped with .NET Core SDK.) -
Launch Rider with the plugin installed
-
if using IntelliJ IDEA:
Open the Gradle tool window in IntelliJ IDEA (View | Tool Windows | Gradle), and execute the
intellij/runIde
task. This will build the frontend, install the plugin to a sandbox, and launch Rider with the plugin. -
if using Gradle command line:
$ ./gradlew runIde
-
- Build the
Debug
configuration inSpring.sln
. - Execute the
buildPlugin
Gradle task. - Install the plugin (
rider-spring/build/distributions/*.zip
) to your Rider installation from disk.