diff --git a/v0.5/fastn-unresolved/src/lib.rs b/v0.5/fastn-unresolved/src/lib.rs index 75bfa87bc..ad672a924 100644 --- a/v0.5/fastn-unresolved/src/lib.rs +++ b/v0.5/fastn-unresolved/src/lib.rs @@ -189,7 +189,7 @@ pub struct ComponentInvocation { #[derive(Debug, Clone, PartialEq)] pub struct Property { pub name: fastn_section::Identifier, - pub value: Vec, + pub value: fastn_section::HeaderValue, } #[derive(Debug, Clone, PartialEq)] diff --git a/v0.5/fastn-unresolved/src/resolver/arguments.rs b/v0.5/fastn-unresolved/src/resolver/arguments.rs index ec4ad0c6f..9199f2520 100644 --- a/v0.5/fastn-unresolved/src/resolver/arguments.rs +++ b/v0.5/fastn-unresolved/src/resolver/arguments.rs @@ -29,7 +29,7 @@ fn caption_or_body( return; } - let _argument = if let fastn_unresolved::UR::UnResolved(Some(_v)) = v { + let (argument, inner_v) = if let fastn_unresolved::UR::UnResolved(Some(inner_v)) = v { // see if any of the arguments are of type caption or body // assume there is only one such argument, because otherwise arguments would have failed // to resolve @@ -40,7 +40,7 @@ fn caption_or_body( v.is_body() } }) { - Some(v) => v, + Some(a) => (a, inner_v), None => { *v = fastn_unresolved::UR::Invalid(fastn_section::Error::UnexpectedCaption); return; @@ -49,4 +49,22 @@ fn caption_or_body( } else { return; }; + + match crate::resolver::arguments::argument(argument, inner_v) { + Ok(Some(_p)) => { + todo!() + // *v = fastn_unresolved::UR::Resolved(p) + } + Ok(None) => { + todo!() + } + Err(e) => *v = fastn_unresolved::UR::Invalid(e), + } +} + +fn argument( + _argument: &fastn_resolved::Argument, + _value: &fastn_section::HeaderValue, +) -> Result, fastn_section::Error> { + todo!() }