generated from rnentjes/kotlin-server-web-undertow
Refactor: Restructure project package hierarchy and add initial implementation for assembler instructions, shell commands, and exception handling.
This commit is contained in:
19
src/jvmMain/kotlin/mtmc/asm/ASMElement.kt
Normal file
19
src/jvmMain/kotlin/mtmc/asm/ASMElement.kt
Normal file
@@ -0,0 +1,19 @@
|
||||
package mtmc.asm
|
||||
|
||||
import mtmc.tokenizer.MTMCToken
|
||||
|
||||
abstract class ASMElement(
|
||||
val labels: List<MTMCToken>,
|
||||
@JvmField var lineNumber: Int
|
||||
) : HasLocation {
|
||||
@JvmField
|
||||
var errors: MutableList<ASMError> = ArrayList()
|
||||
override var location: Int = 0
|
||||
override var sizeInBytes: Int = 0
|
||||
|
||||
fun addError(token: MTMCToken, error: String) {
|
||||
errors.add(ASMError(token, error))
|
||||
}
|
||||
|
||||
abstract fun addError(integerValueRequired: String)
|
||||
}
|
||||
Reference in New Issue
Block a user