prog8/codeGenIntermediate/test/Dummies.kt

21 lines
577 B
Kotlin
Raw Normal View History

import prog8.code.core.DataType
import prog8.code.core.Encoding
import prog8.code.core.IMemSizer
import prog8.code.core.IStringEncoding
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()
}
2023-01-07 14:25:33 +00:00
override fun decodeString(bytes: Iterable<UByte>, encoding: Encoding): String {
return ""
}
}