2022-08-07 00:52:45 +00:00
|
|
|
import prog8.code.core.DataType
|
|
|
|
import prog8.code.core.Encoding
|
|
|
|
import prog8.code.core.IMemSizer
|
|
|
|
import prog8.code.core.IStringEncoding
|
2022-07-17 10:36:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
internal object DummyMemsizer : IMemSizer {
|
|
|
|
override fun memorySize(dt: DataType) = 0
|
|
|
|
override fun memorySize(arrayDt: DataType, numElements: Int) = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
internal object DummyStringEncoder : IStringEncoding {
|
|
|
|
override fun encodeString(str: String, encoding: Encoding): List<UByte> {
|
|
|
|
return emptyList()
|
|
|
|
}
|
|
|
|
|
|
|
|
override fun decodeString(bytes: List<UByte>, encoding: Encoding): String {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
}
|