diff --git a/.run/Run Plugin.run.xml b/.run/Run Plugin.run.xml
new file mode 100644
index 0000000..f53aed2
--- /dev/null
+++ b/.run/Run Plugin.run.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ false
+
+
+
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 173c115..886e4e2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,7 @@
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.9.21"
- id("org.jetbrains.intellij") version "1.16.1"
+ id("org.jetbrains.intellij") version "1.17.3"
}
group = "ru.crabs"
@@ -14,7 +14,9 @@ repositories {
// Include the generated files in the source set
sourceSets {
main {
- kotlin.srcDirs("src/main/gen")
+ java {
+ srcDirs("src/main/gen")
+ }
}
}
@@ -24,17 +26,17 @@ intellij {
version.set("2023.1.5")
type.set("IC") // Target IDE Platform
- plugins.set(listOf(/* Plugin Dependencies */))
+ plugins.set(listOf("com.intellij.java"))
}
tasks {
// Set the JVM compatibility versions
withType {
- sourceCompatibility = "17"
- targetCompatibility = "17"
+ sourceCompatibility = "11"
+ targetCompatibility = "11"
}
withType {
- kotlinOptions.jvmTarget = "17"
+ kotlinOptions.jvmTarget = "11"
}
patchPluginXml {
@@ -42,12 +44,6 @@ tasks {
untilBuild.set("241.*")
}
- signPlugin {
- certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
- privateKey.set(System.getenv("PRIVATE_KEY"))
- password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
- }
-
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
diff --git a/gen/ru/crabs/sdk/language/parser/SJsonParser.java b/gen/ru/crabs/sdk/language/parser/SJsonParser.java
new file mode 100644
index 0000000..731fb7c
--- /dev/null
+++ b/gen/ru/crabs/sdk/language/parser/SJsonParser.java
@@ -0,0 +1,185 @@
+// This is a generated file. Not intended for manual editing.
+package ru.crabs.sdk.language.parser;
+
+import com.intellij.lang.PsiBuilder;
+import com.intellij.lang.PsiBuilder.Marker;
+import static ru.crabs.sdk.language.psi.SJsonTypes.*;
+import static com.intellij.lang.parser.GeneratedParserUtilBase.*;
+import com.intellij.psi.tree.IElementType;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.tree.TokenSet;
+import com.intellij.lang.PsiParser;
+import com.intellij.lang.LightPsiParser;
+
+@SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"})
+public class SJsonParser implements PsiParser, LightPsiParser {
+
+ public ASTNode parse(IElementType t, PsiBuilder b) {
+ parseLight(t, b);
+ return b.getTreeBuilt();
+ }
+
+ public void parseLight(IElementType t, PsiBuilder b) {
+ boolean r;
+ b = adapt_builder_(t, b, this, null);
+ Marker m = enter_section_(b, 0, _COLLAPSE_, null);
+ r = parse_root_(t, b);
+ exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);
+ }
+
+ protected boolean parse_root_(IElementType t, PsiBuilder b) {
+ return parse_root_(t, b, 0);
+ }
+
+ static boolean parse_root_(IElementType t, PsiBuilder b, int l) {
+ return root(b, l + 1);
+ }
+
+ /* ********************************************************** */
+ // "[" (item ",")* item "]"
+ public static boolean array(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "array")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, ARRAY, "");
+ r = consumeToken(b, "[");
+ r = r && array_1(b, l + 1);
+ r = r && item(b, l + 1);
+ r = r && consumeToken(b, "]");
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // (item ",")*
+ private static boolean array_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "array_1")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!array_1_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "array_1", c)) break;
+ }
+ return true;
+ }
+
+ // item ","
+ private static boolean array_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "array_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = item(b, l + 1);
+ r = r && consumeToken(b, ",");
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // object | array | var | string | number
+ public static boolean item(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "item")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, ITEM, "- ");
+ r = object(b, l + 1);
+ if (!r) r = array(b, l + 1);
+ if (!r) r = var(b, l + 1);
+ if (!r) r = consumeToken(b, STRING);
+ if (!r) r = consumeToken(b, NUMBER);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // var ":" item
+ public static boolean mixin(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "mixin")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, MIXIN, "");
+ r = var(b, l + 1);
+ r = r && consumeToken(b, ":");
+ r = r && item(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // "{" (prop ",")* prop "}"
+ public static boolean object(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "object")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, OBJECT, "