Skip to content

Commit a6dfdb4

Browse files
committed
feat: builtin.Byte and array scalars
- added builtin.Byte - added builtin.ByteArray - added builtin.Int32Array - added builtin.UInt32Array - added builtin.Int64Array - added builtin.UInt64Array - added builtin.Float32Array - added builtin.Float64Array
1 parent 50115e5 commit a6dfdb4

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

  • mmrpc-definition/src/commonMain/kotlin
  • mmrpc-gradle-plugin/src/main/kotlin

mmrpc-definition/src/commonMain/kotlin/builtin.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,20 @@ object builtin : NamespaceObject() {
2929
val Boolean by scalar { +"builtin boolean" }
3030
val TRUE by const(true.literal) { +"builtin true" }
3131
val FALSE by const(false.literal) { +"builtin false" }
32+
val Byte by scalar { +"builtin byte" }
33+
val ByteArray by scalar { +"builtin byte array" }
3234
val Int32 by scalar { +"builtin 32bit int" }
35+
val Int32Array by scalar { +"builtin 32bit int array" }
3336
val UInt32 by scalar { +"builtin unsigned 32bit int" }
37+
val UInt32Array by scalar { +"builtin unsigned 32bit int array" }
3438
val Int64 by scalar { +"builtin 64bit int" }
39+
val Int64Array by scalar { +"builtin 64bit int array" }
3540
val UInt64 by scalar { +"builtin unsigned 64bit int" }
41+
val UInt64Array by scalar { +"builtin unsigned 64bit int array" }
3642
val Float32 by scalar { +"builtin 32bit float" }
43+
val Float32Array by scalar { +"builtin 32bit float array" }
3744
val Float64 by scalar { +"builtin 64bit float" }
45+
val Float64Array by scalar { +"builtin 64bit float array" }
3846

3947
val Deprecated__message by prop(String) { +"The deprecation message" }
4048
val Deprecated by metadata { +Deprecated__message }
@@ -53,12 +61,20 @@ object builtin : NamespaceObject() {
5361
Boolean,
5462
TRUE,
5563
FALSE,
64+
Byte,
65+
ByteArray,
5666
Int32,
67+
Int32Array,
5768
UInt32,
69+
UInt32Array,
5870
Int64,
71+
Int64Array,
5972
UInt64,
73+
UInt64Array,
6074
Float32,
75+
Float32Array,
6176
Float64,
77+
Float64Array,
6278
Deprecated__message,
6379
Deprecated,
6480
Experimental__message,

mmrpc-gradle-plugin/src/main/kotlin/Mmrpc.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,20 @@ object Mmrpc {
3939
"builtin.Any" to "kotlin.Any",
4040
"builtin.String" to "kotlin.String",
4141
"builtin.Boolean" to "kotlin.Boolean",
42+
"builtin.Byte" to "kotlin.Byte",
43+
"builtin.ByteArray" to "kotlin.ByteArray",
4244
"builtin.Int32" to "kotlin.Int",
45+
"builtin.Int32Array" to "kotlin.IntArray",
4346
"builtin.UInt32" to "kotlin.UInt",
47+
"builtin.UInt32Array" to "kotlin.UIntArray",
4448
"builtin.Int64" to "kotlin.Long",
49+
"builtin.Int64Array" to "kotlin.LongArray",
4550
"builtin.UInt64" to "kotlin.ULong",
51+
"builtin.UInt64Array" to "kotlin.ULongArray",
4652
"builtin.Float32" to "kotlin.Float",
53+
"builtin.Float32Array" to "kotlin.FloatArray",
4754
"builtin.Float64" to "kotlin.Double",
55+
"builtin.Float64Array" to "kotlin.DoubleArray",
4856
)
4957

5058
val DEFAULT_NATIVE_METADATA_CLASSES = mapOf(

0 commit comments

Comments
 (0)