Fix build.
parent
93b9bcbaa2
commit
7bb91b3509
10
src/cbor.cr
10
src/cbor.cr
|
@ -5,20 +5,20 @@ require "./ipc.cr"
|
|||
class IPC::CBOR
|
||||
include ::CBOR::Serializable
|
||||
|
||||
@[::CBOR::Field(ignored: true)]
|
||||
getter type = -1
|
||||
#@[::CBOR::Field(ignored: true)]
|
||||
#getter type = -1
|
||||
class_getter type = -1
|
||||
|
||||
property id : ::CBOR::Any?
|
||||
def type
|
||||
@@type
|
||||
end
|
||||
|
||||
macro message(id, type, &block)
|
||||
class {{id}} < ::IPC::CBOR
|
||||
include ::CBOR::Serializable
|
||||
|
||||
@@type = {{type}}
|
||||
def type
|
||||
@@type
|
||||
end
|
||||
|
||||
{{yield}}
|
||||
end
|
||||
|
|
12
src/json.cr
12
src/json.cr
|
@ -5,20 +5,20 @@ require "./ipc.cr"
|
|||
class IPC::JSON
|
||||
include ::JSON::Serializable
|
||||
|
||||
@[::JSON::Field(ignored: true)]
|
||||
getter type = -1
|
||||
class_getter type = -1
|
||||
#@[::JSON::Field(ignored: true)]
|
||||
class_property type = -1
|
||||
|
||||
property id : ::JSON::Any?
|
||||
|
||||
def type
|
||||
@@type
|
||||
end
|
||||
|
||||
macro message(id, type, &block)
|
||||
class {{id}} < ::IPC::JSON
|
||||
include ::JSON::Serializable
|
||||
|
||||
@@type = {{type}}
|
||||
def type
|
||||
@@type
|
||||
end
|
||||
|
||||
{{yield}}
|
||||
end
|
||||
|
|
Reference in New Issue