|
|
|
@ -164,7 +164,8 @@ fn parse_atom_kind_symbol<_Value: preserves::value::NestedValue>(_ctxt: &crate::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for AtomKind {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_atom_kind_boolean(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_atom_kind_float(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_atom_kind_double(_ctxt, value) { return Ok(r); }
|
|
|
|
@ -177,7 +178,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for AtomKind {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
AtomKind::Boolean => (&_ctxt.LIT_0_BOOLEAN).clone(),
|
|
|
|
|
AtomKind::Float => (&_ctxt.LIT_1_FLOAT).clone(),
|
|
|
|
@ -224,7 +226,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Binding<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_7_NAMED { return Err(_support::ParseError::conformance_error("schema.Binding")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -236,7 +239,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Binding<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Binding {name: _tmp0, pattern: _tmp1} = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp2 = preserves::value::Record(vec![(&_ctxt.LIT_7_NAMED).clone()]);
|
|
|
|
@ -277,7 +281,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Bundle<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_8_BUNDLE { return Err(_support::ParseError::conformance_error("schema.Bundle")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -288,7 +293,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Bundle<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Bundle {modules: _tmp0} = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp1 = preserves::value::Record(vec![(&_ctxt.LIT_8_BUNDLE).clone()]);
|
|
|
|
@ -476,7 +482,8 @@ fn parse_compound_pattern_dict<_Value: preserves::value::NestedValue>(_ctxt: &cr
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for CompoundPattern<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_compound_pattern_rec(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_compound_pattern_tuple(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_compound_pattern_tuple_prefix(_ctxt, value) { return Ok(r); }
|
|
|
|
@ -486,7 +493,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for CompoundPattern<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
CompoundPattern::Rec {label: _tmp0, fields: _tmp1} => {
|
|
|
|
|
let mut _tmp2 = preserves::value::Record(vec![(&_ctxt.LIT_9_REC).clone()]);
|
|
|
|
@ -678,7 +686,8 @@ fn parse_definition_pattern<_Value: preserves::value::NestedValue>(_ctxt: &crate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Definition<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_definition_or(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_definition_and(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_definition_pattern(_ctxt, value) { return Ok(r); }
|
|
|
|
@ -687,7 +696,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Definition<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
Definition::Or {pattern_0: _tmp0, pattern_1: _tmp1, pattern_n: _tmp2} => {
|
|
|
|
|
let mut _tmp3 = preserves::value::Record(vec![(&_ctxt.LIT_13_OR).clone()]);
|
|
|
|
@ -745,7 +755,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Definitions<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let mut _tmp0 = preserves::value::Map::new();
|
|
|
|
|
for (_tmp1, _tmp2) in value.value().to_dictionary()? {
|
|
|
|
|
let _tmp3 = _tmp1.value().to_symbol()?;
|
|
|
|
@ -757,7 +768,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Definitions<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Definitions(_tmp0) = self;
|
|
|
|
|
preserves::value::Value::Dictionary(_tmp0.iter().map(|(_tmp1, _tmp2)| (preserves::value::Value::symbol(_tmp1).wrap(), _tmp2.unparse(_ctxt))).collect()).wrap()
|
|
|
|
|
}
|
|
|
|
@ -788,7 +800,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for DictionaryEntries<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let mut _tmp0 = preserves::value::Map::new();
|
|
|
|
|
for (_tmp1, _tmp2) in value.value().to_dictionary()? {
|
|
|
|
|
let _tmp3 = _tmp1;
|
|
|
|
@ -800,7 +813,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for DictionaryEntries<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let DictionaryEntries(_tmp0) = self;
|
|
|
|
|
preserves::value::Value::Dictionary(_tmp0.iter().map(|(_tmp1, _tmp2)| (_tmp1.clone(), _tmp2.unparse(_ctxt))).collect()).wrap()
|
|
|
|
|
}
|
|
|
|
@ -852,7 +866,8 @@ fn parse_embedded_type_name_false<_Value: preserves::value::NestedValue>(_ctxt:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for EmbeddedTypeName {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_embedded_type_name_ref(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_embedded_type_name_false(_ctxt, value) { return Ok(r); }
|
|
|
|
|
Err(_support::ParseError::conformance_error("schema.EmbeddedTypeName"))
|
|
|
|
@ -860,7 +875,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for EmbeddedTypeName {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
EmbeddedTypeName::Ref(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
|
EmbeddedTypeName::False => (&_ctxt.LIT_15_FALSE).clone(),
|
|
|
|
@ -890,7 +906,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for ModulePath {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp1 = value.value().to_sequence()?;
|
|
|
|
|
let mut _tmp0 = std::vec::Vec::new();
|
|
|
|
|
for _tmp2 in &_tmp1[0..] {let _tmp3 = _tmp2.value().to_symbol()?; _tmp0.push(_tmp3.clone());}
|
|
|
|
@ -899,7 +916,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for ModulePath {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let ModulePath(_tmp0) = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp1 = std::vec::Vec::new();
|
|
|
|
@ -934,7 +952,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Modules<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let mut _tmp0 = preserves::value::Map::new();
|
|
|
|
|
for (_tmp1, _tmp2) in value.value().to_dictionary()? {
|
|
|
|
|
let _tmp3 = ModulePath::parse(_ctxt, _tmp1)?;
|
|
|
|
@ -946,7 +965,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Modules<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Modules(_tmp0) = self;
|
|
|
|
|
preserves::value::Value::Dictionary(_tmp0.iter().map(|(_tmp1, _tmp2)| (_tmp1.unparse(_ctxt), _tmp2.unparse(_ctxt))).collect()).wrap()
|
|
|
|
|
}
|
|
|
|
@ -976,7 +996,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for NamedAlternative<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp0 = value.value().to_sequence()?;
|
|
|
|
|
if _tmp0.len() < 2 { return Err(_support::ParseError::conformance_error("schema.NamedAlternative")); }
|
|
|
|
|
let _tmp1 = (&_tmp0[0]).value().to_string()?;
|
|
|
|
@ -986,7 +1007,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for NamedAlternative<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let NamedAlternative {variant_label: _tmp0, pattern: _tmp1} = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp2 = std::vec::Vec::new();
|
|
|
|
@ -1035,7 +1057,8 @@ fn parse_named_pattern_anonymous<_Value: preserves::value::NestedValue>(_ctxt: &
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for NamedPattern<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_named_pattern_named(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_named_pattern_anonymous(_ctxt, value) { return Ok(r); }
|
|
|
|
|
Err(_support::ParseError::conformance_error("schema.NamedPattern"))
|
|
|
|
@ -1043,7 +1066,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for NamedPattern<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
NamedPattern::Named(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
|
NamedPattern::Anonymous(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -1089,7 +1113,8 @@ fn parse_named_simple_pattern_anonymous<_Value: preserves::value::NestedValue>(_
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for NamedSimplePattern<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_named_simple_pattern_named(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_named_simple_pattern_anonymous(_ctxt, value) { return Ok(r); }
|
|
|
|
|
Err(_support::ParseError::conformance_error("schema.NamedSimplePattern"))
|
|
|
|
@ -1097,7 +1122,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for NamedSimplePattern<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
NamedSimplePattern::Named(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
|
NamedSimplePattern::Anonymous(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -1143,7 +1169,8 @@ fn parse_pattern_compound_pattern<_Value: preserves::value::NestedValue>(_ctxt:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Pattern<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_pattern_simple_pattern(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_pattern_compound_pattern(_ctxt, value) { return Ok(r); }
|
|
|
|
|
Err(_support::ParseError::conformance_error("schema.Pattern"))
|
|
|
|
@ -1151,7 +1178,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Pattern<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
Pattern::SimplePattern(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
|
Pattern::CompoundPattern(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -1193,7 +1221,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Ref {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_16_REF { return Err(_support::ParseError::conformance_error("schema.Ref")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1205,7 +1234,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Ref {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Ref {module: _tmp0, name: _tmp1} = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp2 = preserves::value::Record(vec![(&_ctxt.LIT_16_REF).clone()]);
|
|
|
|
@ -1284,7 +1314,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Schema<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_17_SCHEMA { return Err(_support::ParseError::conformance_error("schema.Schema")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1301,7 +1332,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Schema<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Schema {definitions: _tmp0, embedded_type: _tmp1, version: _tmp2} = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp3 = preserves::value::Record(vec![(&_ctxt.LIT_17_SCHEMA).clone()]);
|
|
|
|
@ -1568,7 +1600,8 @@ fn parse_simple_pattern_ref<_Value: preserves::value::NestedValue>(_ctxt: &crate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for SimplePattern<_Value> {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if let Ok(r) = parse_simple_pattern_any(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_simple_pattern_atom(_ctxt, value) { return Ok(r); }
|
|
|
|
|
if let Ok(r) = parse_simple_pattern_embedded(_ctxt, value) { return Ok(r); }
|
|
|
|
@ -1582,7 +1615,8 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for SimplePattern<_Value> {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
SimplePattern::Any => (&_ctxt.LIT_21_ANY).clone(),
|
|
|
|
|
SimplePattern::Atom {atom_kind: _tmp0} => {
|
|
|
|
@ -1641,7 +1675,8 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals<_Value>, _Value> for Version {
|
|
|
|
|
fn parse(_ctxt: &crate::gen::Literals<_Value>, value: &_Value) -> std::result::Result<Self, _support::ParseError> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Literals<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if value != &_ctxt.LIT_28_1 { return Err(_support::ParseError::conformance_error("schema.Version")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(Version)
|
|
|
|
@ -1649,5 +1684,5 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Literals
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Literals<_Value>, _Value> for Version {
|
|
|
|
|
fn unparse(&self, _ctxt: &crate::gen::Literals<_Value>) -> _Value {let Version = self; (&_ctxt.LIT_28_1).clone()}
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Literals<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Literals<_Value>: 'a {let _ctxt = _ctxt.into(); let Version = self; (&_ctxt.LIT_28_1).clone()}
|
|
|
|
|
}
|
|
|
|
|