Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions IDEA/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ kotlin {

dependencies {
intellijPlatform {
intellijIdeaCommunity("2025.1.1.1")
intellijIdeaCommunity("2024.3.4.1")

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

Expand All @@ -68,10 +68,10 @@ intellijPlatform {
pluginConfiguration {
// ...

version = "1.4.0.2"
version = "1.4.0.3"

ideaVersion {
sinceBuild = "251.25410.129"
sinceBuild = "243.25659.59"
untilBuild = provider { null }
}
}
Expand Down
2 changes: 1 addition & 1 deletion IDEA/src/main/grammar/KerboScript.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ instruction ::= !(CURLYCLOSE | <<eof>>) instruction_inner {
pin = 1
recoverWhile = instruction_recover
}
private instruction_first ::= ADD | BREAK | CLEARSCREEN | COMPILE | COPY | DECLARE | DELETE | EDIT | FOR | FROM
private instruction_first ::= ADD | BREAK | CLEARSCREEN | COMPILE | COPY | CURLYOPEN | DECLARE | DELETE | EDIT | FOR | FROM
| FUNCTION | GLOBAL | IF | LIST | LOCAL | LOCK | LOG | ON | PARAMETER | PRESERVE | PRINT | REBOOT | REMOVE | RENAME
| RETURN | RUN | RUNONCEPATH | RUNPATH | SET | SHUTDOWN | STAGE | SWITCH | TOGGLE | UNLOCK | UNSET | UNTIL | WAIT
| WHEN | COMMENTLINE | ident
Expand Down
8 changes: 8 additions & 0 deletions IDEA/src/test/testData/parsing/ErrorRecovery.ks
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ IF foo {
PRINT
}
LOCAL baz TO 0.

function test{
print "begin".
{ // Error highlighted here: '{' Unexpected
print "inside a code block".
}
print "end".
}
47 changes: 45 additions & 2 deletions IDEA/src/test/testData/parsing/ErrorRecovery.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FILE(0,195)
FILE(0,340)
PsiComment(COMMENTLINE)('// Testing instruction recovery')(0,31)
PsiWhiteSpace('\n')(31,32)
KerboScriptInstructionImpl(INSTRUCTION)(32,32)
Expand Down Expand Up @@ -152,4 +152,47 @@ FILE(0,195)
KerboScriptAtomImpl(ATOM)(193,194)
KerboScriptNumberImpl(NUMBER)(193,194)
PsiElement(INTEGER)('0')(193,194)
PsiElement(.)('.')(194,195)
PsiElement(.)('.')(194,195)
PsiWhiteSpace('\n\n')(195,197)
KerboScriptDeclareStmtImpl(DECLARE_STMT)(197,340)
KerboScriptDeclareFunctionClauseImpl(DECLARE_FUNCTION_CLAUSE)(197,340)
PsiElement(FUNCTION)('function')(197,205)
PsiWhiteSpace(' ')(205,206)
KerboScriptIdentImpl(IDENT)(206,210)
PsiElement(IDENTIFIER)('test')(206,210)
KerboScriptInstructionBlockImpl(INSTRUCTION_BLOCK)(210,340)
PsiElement({)('{')(210,211)
PsiWhiteSpace('\n ')(211,216)
KerboScriptPrintStmtImpl(PRINT_STMT)(216,230)
PsiElement(PRINT)('print')(216,221)
PsiWhiteSpace(' ')(221,222)
KerboScriptSuffixtermImpl(SUFFIXTERM)(222,229)
KerboScriptAtomImpl(ATOM)(222,229)
PsiElement(STRING)('"begin"')(222,229)
PsiElement(.)('.')(229,230)
PsiWhiteSpace('\n ')(230,235)
KerboScriptInstructionImpl(INSTRUCTION)(235,321)
KerboScriptInstructionBlockImpl(INSTRUCTION_BLOCK)(235,321)
PsiElement({)('{')(235,236)
PsiWhiteSpace(' ')(236,237)
PsiComment(COMMENTLINE)('// Error highlighted here: '{' Unexpected')(237,278)
PsiWhiteSpace('\n ')(278,287)
KerboScriptPrintStmtImpl(PRINT_STMT)(287,315)
PsiElement(PRINT)('print')(287,292)
PsiWhiteSpace(' ')(292,293)
KerboScriptSuffixtermImpl(SUFFIXTERM)(293,314)
KerboScriptAtomImpl(ATOM)(293,314)
PsiElement(STRING)('"inside a code block"')(293,314)
PsiElement(.)('.')(314,315)
PsiWhiteSpace('\n ')(315,320)
PsiElement(})('}')(320,321)
PsiWhiteSpace('\n ')(321,326)
KerboScriptPrintStmtImpl(PRINT_STMT)(326,338)
PsiElement(PRINT)('print')(326,331)
PsiWhiteSpace(' ')(331,332)
KerboScriptSuffixtermImpl(SUFFIXTERM)(332,337)
KerboScriptAtomImpl(ATOM)(332,337)
PsiElement(STRING)('"end"')(332,337)
PsiElement(.)('.')(337,338)
PsiWhiteSpace('\n')(338,339)
PsiElement(})('}')(339,340)
Loading