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