File tree Expand file tree Collapse file tree 5 files changed +39
-0
lines changed
rpgJavaInterpreter-core/src
main/kotlin/com/smeup/rpgparser/parsing
kotlin/com/smeup/rpgparser/smeup Expand file tree Collapse file tree 5 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ private val modules = SerializersModule {
65
65
subclass(DowStmt ::class )
66
66
subclass(DOWxxStmt ::class )
67
67
subclass(EvalStmt ::class )
68
+ subclass(ExceptStmt ::class )
68
69
subclass(ExecuteSubroutine ::class )
69
70
subclass(ExfmtStmt ::class )
70
71
subclass(FeodStmt ::class )
Original file line number Diff line number Diff line change @@ -2410,6 +2410,19 @@ data class UnlockStmt(
2410
2410
override fun execute (interpreter : InterpreterCore ) {}
2411
2411
}
2412
2412
2413
+ @Serializable
2414
+ data class ExceptStmt (
2415
+ override val position : Position ? = null
2416
+ ) : Statement(position) {
2417
+ override val loggableEntityName: String
2418
+ get() = " EXCEPT"
2419
+
2420
+ override fun execute (interpreter : InterpreterCore ) {
2421
+ // TODO: Replace with actual implementation
2422
+ throw NotImplementedError (" EXCEPT statement is not implemented yet" )
2423
+ }
2424
+ }
2425
+
2413
2426
@Serializable
2414
2427
data class FeodStmt (
2415
2428
override val position : Position ? = null
Original file line number Diff line number Diff line change @@ -962,6 +962,9 @@ internal fun Cspec_fixed_standardContext.toAst(conf: ToAstConfiguration = ToAstC
962
962
this .csUNLOCK() != null -> this .csUNLOCK()
963
963
.let { it.cspec_fixed_standard_parts().validate(stmt = it.toAst(conf), conf = conf) }
964
964
965
+ this .csEXCEPT() != null -> this .csEXCEPT()
966
+ .let { it.cspec_fixed_standard_parts().validate(stmt = it.toAst(conf), conf = conf) }
967
+
965
968
this .csFEOD() != null -> this .csFEOD()
966
969
.let { it.cspec_fixed_standard_parts().validate(stmt = it.toAst(conf), conf = conf) }
967
970
@@ -2093,6 +2096,12 @@ internal fun CsUNLOCKContext.toAst(conf: ToAstConfiguration = ToAstConfiguration
2093
2096
return UnlockStmt (position)
2094
2097
}
2095
2098
2099
+ // TODO
2100
+ internal fun CsEXCEPTContext.toAst (conf : ToAstConfiguration = ToAstConfiguration ()): Statement {
2101
+ val position = toPosition(conf.considerPosition)
2102
+ return ExceptStmt (position)
2103
+ }
2104
+
2096
2105
internal fun CsTESTNContext.toAst (conf : ToAstConfiguration = ToAstConfiguration ()): TestnStmt {
2097
2106
val position = toPosition(conf.considerPosition)
2098
2107
val resultExpression = this .cspec_fixed_standard_parts().resultExpression(conf) as AssignableExpression
Original file line number Diff line number Diff line change @@ -122,4 +122,14 @@ open class MULANGT10BaseCodopTest : MULANGTTest() {
122
122
val expected = listOf (" 51=1,52=0,53=0" )
123
123
assertEquals(expected, " smeup/MU102501" .outputOf())
124
124
}
125
+
126
+ /* *
127
+ * EXCEPT statement is supported
128
+ * @see #LS24002974
129
+ */
130
+ @Test
131
+ fun executeMUDRNRAPU00216 () {
132
+ val expected = listOf (" ok" )
133
+ assertEquals(expected, " smeup/MUDRNRAPU00216" .outputOf())
134
+ }
125
135
}
Original file line number Diff line number Diff line change
1
+ D £DBG_Str S 2
2
+ C IF 0
3
+ C EXCEPT E1RIGA
4
+ C ENDIF
5
+ C EVAL £DBG_Str = 'ok'
6
+ C £DBG_Str DSPLY
You can’t perform that action at this time.
0 commit comments