Fix build.

master
Philippe Pittoli 2023-02-01 04:32:24 +01:00
parent 93b9bcbaa2
commit 7bb91b3509
2 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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