-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into bugfix/LS24004491/dim-on-constant
- Loading branch information
Showing
39 changed files
with
476 additions
and
194 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
dspfparser/src/main/kotlin/com/smeup/dspfparser/linesclassifier/ConstantField.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.smeup.dspfparser.linesclassifier | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ConstantField( | ||
val value: ConstantValue?, | ||
override val x: Int?, | ||
override val y: Int? | ||
) : DSPFField |
17 changes: 17 additions & 0 deletions
17
dspfparser/src/main/kotlin/com/smeup/dspfparser/linesclassifier/ConstantValue.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.smeup.dspfparser.linesclassifier | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.modules.SerializersModule | ||
|
||
/** | ||
* Unlike variable fields, a constant field should be initialized with its value in the | ||
* parser phase since it is hardwired into the display file. | ||
* This [DSPFValue] implementation allows the value to be passed into Jariko. | ||
* Importing Jariko's [DSPFValue] implementations is not a good choice because Jariko depends on this | ||
* module and not the vice versa. | ||
* To make serialization / deserialization work proper declarations in [SerializersModule] is needed | ||
* because [DSPFValue] is not sealed (its implementers are in another package, | ||
* in rpgJavaInterpreter-core module). | ||
*/ | ||
@Serializable | ||
data class ConstantValue(val value: String) : DSPFValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 22 additions & 20 deletions
42
dspfparser/src/main/kotlin/com/smeup/dspfparser/linesclassifier/DSPFFieldSpecifications.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
dspfparser/src/main/kotlin/com/smeup/dspfparser/linesclassifier/MutableField.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.smeup.dspfparser.linesclassifier | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class MutableField( | ||
val name: String, | ||
var value: DSPFValue?, | ||
val isNumeric: Boolean, | ||
val length: Int?, | ||
val precision: Int?, | ||
val type: DSPFFieldType, | ||
override val x: Int?, | ||
override val y: Int? | ||
) : DSPFField |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.