Compare commits
No commits in common. "ff3e0a50af68611dcda55560a0bf7079df5900fd" and "7f3f5fb889abc848e1674d945b16fc29999c1e4f" have entirely different histories.
ff3e0a50af
...
7f3f5fb889
@ -7,7 +7,6 @@ use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::CenterBlock;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
@ -22,12 +21,8 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::CenterBlock(original) },
|
||||
{ "center-block".into() },
|
||||
{ "TODO".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
let children = original
|
||||
.children
|
||||
.iter()
|
||||
@ -41,7 +36,7 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmCenterBlock {
|
||||
additional_properties,
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -7,16 +7,12 @@ use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::DynamicBlock;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmDynamicBlock {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
#[serde(rename = "block-name")]
|
||||
pub(crate) block_name: String,
|
||||
pub(crate) arguments: Option<String>,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -25,12 +21,8 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::DynamicBlock(original) },
|
||||
{ "dynamic-block".into() },
|
||||
{ "TODO".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
let children = original
|
||||
.children
|
||||
.iter()
|
||||
@ -44,9 +36,7 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmDynamicBlock {
|
||||
additional_properties,
|
||||
block_name: original.block_name.to_owned(),
|
||||
arguments: original.parameters.map(|s| s.to_owned()),
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -4,14 +4,15 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::NodeProperty;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmNodeProperty {
|
||||
pub(crate) key: String,
|
||||
pub(crate) value: Option<String>,
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -20,13 +21,12 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::NodeProperty(original) },
|
||||
{ "node-property".into() },
|
||||
{ "TODO".into() },
|
||||
{
|
||||
Ok((
|
||||
Vec::new(),
|
||||
WasmNodeProperty {
|
||||
key: original.property_name.to_owned(),
|
||||
value: original.value.map(|s| s.to_owned()),
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -42,15 +42,7 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmPlainListItem {
|
||||
tag: original
|
||||
.tag
|
||||
.iter()
|
||||
.map(|child| {
|
||||
child
|
||||
.to_wasm(wasm_context.clone())
|
||||
.map(Into::<WasmAstNode>::into)
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?,
|
||||
tag: Vec::new(),
|
||||
bullet: original.bullet.to_owned(),
|
||||
counter: original.counter.clone(),
|
||||
checkbox: original.checkbox.as_ref().map(|(checkbox_type, _)| {
|
||||
|
@ -4,12 +4,16 @@ use serde::Serialize;
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::PropertyDrawer;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WasmPropertyDrawer {}
|
||||
pub struct WasmPropertyDrawer {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
WasmPropertyDrawer,
|
||||
@ -17,7 +21,7 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::PropertyDrawer(original) },
|
||||
{ "property-drawer".into() },
|
||||
{ "TODO".into() },
|
||||
{
|
||||
let children = original
|
||||
.children
|
||||
@ -29,6 +33,11 @@ to_wasm!(
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok((children, WasmPropertyDrawer {}))
|
||||
Ok((
|
||||
children,
|
||||
WasmPropertyDrawer {
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
}
|
||||
);
|
||||
|
@ -6,7 +6,6 @@ use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::types::QuoteBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
@ -22,12 +21,8 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::QuoteBlock(original) },
|
||||
{ "quote-block".into() },
|
||||
{ "TODO".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
let children = original
|
||||
.children
|
||||
.iter()
|
||||
@ -41,7 +36,7 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmQuoteBlock {
|
||||
additional_properties,
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -2,12 +2,10 @@ use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use super::ast_node::WasmAstNode;
|
||||
use super::headline::Noop;
|
||||
use super::macros::to_wasm;
|
||||
use super::to_wasm::ToWasm;
|
||||
use super::AdditionalProperties;
|
||||
use crate::compare::ElispFact;
|
||||
use crate::types::GetAffiliatedKeywords;
|
||||
use crate::types::SpecialBlock;
|
||||
use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
|
||||
@ -15,10 +13,6 @@ use crate::wasm::to_wasm::ToWasmStandardProperties;
|
||||
pub struct WasmSpecialBlock {
|
||||
#[serde(flatten)]
|
||||
pub(crate) additional_properties: AdditionalProperties,
|
||||
#[serde(rename = "type")]
|
||||
pub(crate) block_type: String,
|
||||
pub(crate) parameters: Option<String>,
|
||||
pub(crate) results: Noop,
|
||||
}
|
||||
|
||||
to_wasm!(
|
||||
@ -27,12 +21,8 @@ to_wasm!(
|
||||
original,
|
||||
wasm_context,
|
||||
{ WasmAstNode::SpecialBlock(original) },
|
||||
{ "special-block".into() },
|
||||
{ "TODO".into() },
|
||||
{
|
||||
let additional_properties = original
|
||||
.get_affiliated_keywords()
|
||||
.to_wasm(wasm_context.clone())?;
|
||||
|
||||
let children = original
|
||||
.children
|
||||
.iter()
|
||||
@ -46,10 +36,7 @@ to_wasm!(
|
||||
Ok((
|
||||
children,
|
||||
WasmSpecialBlock {
|
||||
additional_properties,
|
||||
block_type: original.block_type.to_owned(),
|
||||
parameters: original.parameters.map(|s| s.to_owned()),
|
||||
results: Noop {},
|
||||
additional_properties: AdditionalProperties::default(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ fn compare_json_value<'b, 's>(
|
||||
(serde_json::Value::String(w), Token::Atom(e)) if w.as_str() == *e => {
|
||||
Ok(WasmDiffResult::default())
|
||||
}
|
||||
(serde_json::Value::Object(w), _) if w.contains_key("noop") => {
|
||||
(serde_json::Value::Object(w), Token::Atom(_)) if w.contains_key("noop") => {
|
||||
Ok(WasmDiffResult::default())
|
||||
}
|
||||
(serde_json::Value::Null, Token::Atom(_)) => todo!(),
|
||||
@ -156,9 +156,6 @@ fn compare_optional_json_value<'b, 's>(
|
||||
(None, None) | (None, Some(serde_json::Value::Null)) | (Some(Token::Atom("nil")), None) => {
|
||||
Ok(WasmDiffResult::default())
|
||||
}
|
||||
(None, Some(serde_json::Value::Object(w))) if w.contains_key("noop") => {
|
||||
Ok(WasmDiffResult::default())
|
||||
}
|
||||
(Some(e), Some(w)) => compare_json_value(source, e, w),
|
||||
_ => Ok(WasmDiffResult {
|
||||
status: vec![WasmDiffStatus::Bad(
|
||||
|
Loading…
x
Reference in New Issue
Block a user