Skip to content

Commit eaefb37

Browse files
authored
Merge pull request #90 from valery-labuzhsky/develop
Vesrion 1.4.0.3
2 parents 354bb3f + f1ccd04 commit eaefb37

4 files changed

Lines changed: 57 additions & 6 deletions

File tree

IDEA/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ kotlin {
4141

4242
dependencies {
4343
intellijPlatform {
44-
intellijIdeaCommunity("2025.1.1.1")
44+
intellijIdeaCommunity("2024.3.4.1")
4545

4646
bundledPlugins(listOf("com.intellij.java"))
4747

@@ -68,10 +68,10 @@ intellijPlatform {
6868
pluginConfiguration {
6969
// ...
7070

71-
version = "1.4.0.2"
71+
version = "1.4.0.3"
7272

7373
ideaVersion {
74-
sinceBuild = "251.25410.129"
74+
sinceBuild = "243.25659.59"
7575
untilBuild = provider { null }
7676
}
7777
}

IDEA/src/main/grammar/KerboScript.bnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ instruction ::= !(CURLYCLOSE | <<eof>>) instruction_inner {
134134
pin = 1
135135
recoverWhile = instruction_recover
136136
}
137-
private instruction_first ::= ADD | BREAK | CLEARSCREEN | COMPILE | COPY | DECLARE | DELETE | EDIT | FOR | FROM
137+
private instruction_first ::= ADD | BREAK | CLEARSCREEN | COMPILE | COPY | CURLYOPEN | DECLARE | DELETE | EDIT | FOR | FROM
138138
| FUNCTION | GLOBAL | IF | LIST | LOCAL | LOCK | LOG | ON | PARAMETER | PRESERVE | PRINT | REBOOT | REMOVE | RENAME
139139
| RETURN | RUN | RUNONCEPATH | RUNPATH | SET | SHUTDOWN | STAGE | SWITCH | TOGGLE | UNLOCK | UNSET | UNTIL | WAIT
140140
| WHEN | COMMENTLINE | ident

IDEA/src/test/testData/parsing/ErrorRecovery.ks

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ IF foo {
99
PRINT
1010
}
1111
LOCAL baz TO 0.
12+
13+
function test{
14+
print "begin".
15+
{ // Error highlighted here: '{' Unexpected
16+
print "inside a code block".
17+
}
18+
print "end".
19+
}

IDEA/src/test/testData/parsing/ErrorRecovery.txt

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FILE(0,195)
1+
FILE(0,340)
22
PsiComment(COMMENTLINE)('// Testing instruction recovery')(0,31)
33
PsiWhiteSpace('\n')(31,32)
44
KerboScriptInstructionImpl(INSTRUCTION)(32,32)
@@ -152,4 +152,47 @@ FILE(0,195)
152152
KerboScriptAtomImpl(ATOM)(193,194)
153153
KerboScriptNumberImpl(NUMBER)(193,194)
154154
PsiElement(INTEGER)('0')(193,194)
155-
PsiElement(.)('.')(194,195)
155+
PsiElement(.)('.')(194,195)
156+
PsiWhiteSpace('\n\n')(195,197)
157+
KerboScriptDeclareStmtImpl(DECLARE_STMT)(197,340)
158+
KerboScriptDeclareFunctionClauseImpl(DECLARE_FUNCTION_CLAUSE)(197,340)
159+
PsiElement(FUNCTION)('function')(197,205)
160+
PsiWhiteSpace(' ')(205,206)
161+
KerboScriptIdentImpl(IDENT)(206,210)
162+
PsiElement(IDENTIFIER)('test')(206,210)
163+
KerboScriptInstructionBlockImpl(INSTRUCTION_BLOCK)(210,340)
164+
PsiElement({)('{')(210,211)
165+
PsiWhiteSpace('\n ')(211,216)
166+
KerboScriptPrintStmtImpl(PRINT_STMT)(216,230)
167+
PsiElement(PRINT)('print')(216,221)
168+
PsiWhiteSpace(' ')(221,222)
169+
KerboScriptSuffixtermImpl(SUFFIXTERM)(222,229)
170+
KerboScriptAtomImpl(ATOM)(222,229)
171+
PsiElement(STRING)('"begin"')(222,229)
172+
PsiElement(.)('.')(229,230)
173+
PsiWhiteSpace('\n ')(230,235)
174+
KerboScriptInstructionImpl(INSTRUCTION)(235,321)
175+
KerboScriptInstructionBlockImpl(INSTRUCTION_BLOCK)(235,321)
176+
PsiElement({)('{')(235,236)
177+
PsiWhiteSpace(' ')(236,237)
178+
PsiComment(COMMENTLINE)('// Error highlighted here: '{' Unexpected')(237,278)
179+
PsiWhiteSpace('\n ')(278,287)
180+
KerboScriptPrintStmtImpl(PRINT_STMT)(287,315)
181+
PsiElement(PRINT)('print')(287,292)
182+
PsiWhiteSpace(' ')(292,293)
183+
KerboScriptSuffixtermImpl(SUFFIXTERM)(293,314)
184+
KerboScriptAtomImpl(ATOM)(293,314)
185+
PsiElement(STRING)('"inside a code block"')(293,314)
186+
PsiElement(.)('.')(314,315)
187+
PsiWhiteSpace('\n ')(315,320)
188+
PsiElement(})('}')(320,321)
189+
PsiWhiteSpace('\n ')(321,326)
190+
KerboScriptPrintStmtImpl(PRINT_STMT)(326,338)
191+
PsiElement(PRINT)('print')(326,331)
192+
PsiWhiteSpace(' ')(331,332)
193+
KerboScriptSuffixtermImpl(SUFFIXTERM)(332,337)
194+
KerboScriptAtomImpl(ATOM)(332,337)
195+
PsiElement(STRING)('"end"')(332,337)
196+
PsiElement(.)('.')(337,338)
197+
PsiWhiteSpace('\n')(338,339)
198+
PsiElement(})('}')(339,340)

0 commit comments

Comments
 (0)