Implement keyword.
This commit is contained in:
parent
a4a83d047d
commit
cd6a64c015
@ -6,6 +6,7 @@ use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::types::Keyword;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
@ -13,6 +14,8 @@ use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
pub struct WasmKeyword {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
pub(crate) key: String,
|
||||
pub(crate) value: String,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -21,12 +24,18 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::Keyword(original) },
|
||||
{ "TODO".into() },
|
||||
{ "keyword".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmKeyword {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
additional_properties,
|
||||
key: original.key.to_owned(),
|
||||
value: original.value.to_owned(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user