boolean variables can now also be memory-mapped (including boolean arrays)

This commit is contained in:
Irmen de Jong
2024-12-11 18:08:26 +01:00
parent f8aaa2d13c
commit 3675d7961b
9 changed files with 29 additions and 22 deletions

View File

@@ -238,7 +238,7 @@ class StMemVar(name: String,
StNode(name, StNodeType.MEMVAR, astNode) {
init{
require(!dt.isBool && !dt.isBoolArray)
require(!dt.isString)
if(dt.isStringly && !dt.isWord)
requireNotNull(length)
}

View File

@@ -172,7 +172,7 @@ class PtConstant(name: String, override val type: DataType, val value: Double, p
class PtMemMapped(name: String, override val type: DataType, val address: UInt, val arraySize: UInt?, position: Position) : PtNamedNode(name, position), IPtVariable {
init {
require(!type.isBool && !type.isBoolArray)
require(!type.isString)
}
}