Implement comment.
This commit is contained in:
parent
eb2995dd3b
commit
cdf87641c5
@ -4,15 +4,13 @@ use serde::Serialize;
|
|||||||
use super::ast_node::WasmAstNode;
|
use super::ast_node::WasmAstNode;
|
||||||
use super::macros::to_wasm;
|
use super::macros::to_wasm;
|
||||||
use super::to_wasm::ToWasm;
|
use super::to_wasm::ToWasm;
|
||||||
use super::AdditionalProperties;
|
|
||||||
use crate::compare::ElispFact;
|
use crate::compare::ElispFact;
|
||||||
use crate::types::Comment;
|
use crate::types::Comment;
|
||||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct WasmComment {
|
pub struct WasmComment {
|
||||||
#[serde(flatten)]
|
pub(crate) value: String,
|
||||||
pub(crate) additional_properties: AdditionalProperties,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
to_wasm!(
|
to_wasm!(
|
||||||
@ -21,12 +19,12 @@ to_wasm!(
|
|||||||
original,
|
original,
|
||||||
wasm_context,
|
wasm_context,
|
||||||
{ WasmAstNode::Comment(original) },
|
{ WasmAstNode::Comment(original) },
|
||||||
{ "TODO".into() },
|
{ "comment".into() },
|
||||||
{
|
{
|
||||||
Ok((
|
Ok((
|
||||||
Vec::new(),
|
Vec::new(),
|
||||||
WasmComment {
|
WasmComment {
|
||||||
additional_properties: AdditionalProperties::default(),
|
value: original.get_value(),
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ to_wasm!(
|
|||||||
Vec::new(),
|
Vec::new(),
|
||||||
WasmKeyword {
|
WasmKeyword {
|
||||||
additional_properties,
|
additional_properties,
|
||||||
key: original.key.to_owned(),
|
key: original.key.to_uppercase(),
|
||||||
value: original.value.to_owned(),
|
value: original.value.to_owned(),
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user