|
|
|
@ -121,50 +121,51 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_boolean<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_boolean<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_0_BOOLEAN { return Err(_support::ParseError::conformance_error("schema.AtomKind::Boolean")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::Boolean)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_float<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_float<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_1_FLOAT { return Err(_support::ParseError::conformance_error("schema.AtomKind::Float")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::Float)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_double<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_double<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_2_DOUBLE { return Err(_support::ParseError::conformance_error("schema.AtomKind::Double")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::Double)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_signed_integer<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_signed_integer<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_3_SIGNED_INTEGER { return Err(_support::ParseError::conformance_error("schema.AtomKind::SignedInteger")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::SignedInteger)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_string<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_string<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_4_STRING { return Err(_support::ParseError::conformance_error("schema.AtomKind::String")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::String)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_byte_string<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_byte_string<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_5_BYTE_STRING { return Err(_support::ParseError::conformance_error("schema.AtomKind::ByteString")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::ByteString)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_atom_kind_symbol<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
fn parse_atom_kind_symbol<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<AtomKind, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_6_SYMBOL { return Err(_support::ParseError::conformance_error("schema.AtomKind::Symbol")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(AtomKind::Symbol)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for AtomKind {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for AtomKind {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -177,8 +178,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for AtomKind {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for AtomKind {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
AtomKind::Boolean => (&_ctxt.LIT_0_BOOLEAN).clone(),
|
|
|
|
@ -225,8 +227,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Binding<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Binding<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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")); }
|
|
|
|
@ -238,8 +241,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Binding<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Binding<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Binding {name: _tmp0, pattern: _tmp1} = self;
|
|
|
|
|
{
|
|
|
|
@ -280,8 +284,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Bundle<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Bundle<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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")); }
|
|
|
|
@ -292,8 +297,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Bundle<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Bundle<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Bundle {modules: _tmp0} = self;
|
|
|
|
|
{
|
|
|
|
@ -439,7 +445,7 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_compound_pattern_rec<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_compound_pattern_rec<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_9_REC { return Err(_support::ParseError::conformance_error("schema.CompoundPattern::rec")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -449,30 +455,36 @@ fn parse_compound_pattern_rec<_Value: preserves::value::NestedValue>(_ctxt: &cra
|
|
|
|
|
Ok(CompoundPattern::Rec {label: std::boxed::Box::new(_tmp2), fields: std::boxed::Box::new(_tmp3)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_compound_pattern_tuple<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_compound_pattern_tuple<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_10_TUPLE { return Err(_support::ParseError::conformance_error("schema.CompoundPattern::tuple")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
|
if _tmp0.fields().len() < 1 { return Err(_support::ParseError::conformance_error("schema.CompoundPattern::tuple")); }
|
|
|
|
|
let _tmp3 = (&_tmp0.fields()[0]).value().to_sequence()?;
|
|
|
|
|
let mut _tmp2 = std::vec::Vec::new();
|
|
|
|
|
for _tmp4 in &_tmp3[0..] {let _tmp5 = NamedPattern::parse(_ctxt, _tmp4)?; _tmp2.push(_tmp5);}
|
|
|
|
|
for _tmp4 in &_tmp3[0..] {
|
|
|
|
|
let _tmp5 = NamedPattern::parse(_ctxt, _tmp4)?;
|
|
|
|
|
_tmp2.push(_tmp5);
|
|
|
|
|
}
|
|
|
|
|
Ok(CompoundPattern::Tuple {patterns: _tmp2})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_compound_pattern_tuple_prefix<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_compound_pattern_tuple_prefix<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_11_TUPLE_PREFIX { return Err(_support::ParseError::conformance_error("schema.CompoundPattern::tuplePrefix")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
|
if _tmp0.fields().len() < 2 { return Err(_support::ParseError::conformance_error("schema.CompoundPattern::tuplePrefix")); }
|
|
|
|
|
let _tmp3 = (&_tmp0.fields()[0]).value().to_sequence()?;
|
|
|
|
|
let mut _tmp2 = std::vec::Vec::new();
|
|
|
|
|
for _tmp4 in &_tmp3[0..] {let _tmp5 = NamedPattern::parse(_ctxt, _tmp4)?; _tmp2.push(_tmp5);}
|
|
|
|
|
for _tmp4 in &_tmp3[0..] {
|
|
|
|
|
let _tmp5 = NamedPattern::parse(_ctxt, _tmp4)?;
|
|
|
|
|
_tmp2.push(_tmp5);
|
|
|
|
|
}
|
|
|
|
|
let _tmp6 = NamedSimplePattern::parse(_ctxt, (&_tmp0.fields()[1]))?;
|
|
|
|
|
Ok(CompoundPattern::TuplePrefix {fixed: _tmp2, variable: std::boxed::Box::new(_tmp6)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_compound_pattern_dict<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_compound_pattern_dict<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<CompoundPattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_12_DICT { return Err(_support::ParseError::conformance_error("schema.CompoundPattern::dict")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -481,8 +493,9 @@ fn parse_compound_pattern_dict<_Value: preserves::value::NestedValue>(_ctxt: &cr
|
|
|
|
|
Ok(CompoundPattern::Dict {entries: std::boxed::Box::new(_tmp2)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for CompoundPattern<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for CompoundPattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -492,8 +505,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for CompoundPattern<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for CompoundPattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
CompoundPattern::Rec {label: _tmp0, fields: _tmp1} => {
|
|
|
|
@ -507,7 +521,9 @@ impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Langua
|
|
|
|
|
_tmp1.fields_vec_mut().push(
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp2 = std::vec::Vec::new();
|
|
|
|
|
for _tmp3 in _tmp0 {_tmp2.push(_tmp3.unparse(_ctxt));}
|
|
|
|
|
for _tmp3 in _tmp0 {
|
|
|
|
|
_tmp2.push(_tmp3.unparse(_ctxt));
|
|
|
|
|
}
|
|
|
|
|
preserves::value::Value::Sequence(_tmp2).wrap()
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
@ -518,7 +534,9 @@ impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Langua
|
|
|
|
|
_tmp2.fields_vec_mut().push(
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp3 = std::vec::Vec::new();
|
|
|
|
|
for _tmp4 in _tmp0 {_tmp3.push(_tmp4.unparse(_ctxt));}
|
|
|
|
|
for _tmp4 in _tmp0 {
|
|
|
|
|
_tmp3.push(_tmp4.unparse(_ctxt));
|
|
|
|
|
}
|
|
|
|
|
preserves::value::Value::Sequence(_tmp3).wrap()
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
@ -644,7 +662,7 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_definition_or<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Definition<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_definition_or<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Definition<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_13_OR { return Err(_support::ParseError::conformance_error("schema.Definition::or")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -654,7 +672,10 @@ fn parse_definition_or<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen
|
|
|
|
|
let _tmp3 = NamedAlternative::parse(_ctxt, (&_tmp2[0]))?;
|
|
|
|
|
let _tmp4 = NamedAlternative::parse(_ctxt, (&_tmp2[1]))?;
|
|
|
|
|
let mut _tmp5 = std::vec::Vec::new();
|
|
|
|
|
for _tmp6 in &_tmp2[2..] {let _tmp7 = NamedAlternative::parse(_ctxt, _tmp6)?; _tmp5.push(_tmp7);}
|
|
|
|
|
for _tmp6 in &_tmp2[2..] {
|
|
|
|
|
let _tmp7 = NamedAlternative::parse(_ctxt, _tmp6)?;
|
|
|
|
|
_tmp5.push(_tmp7);
|
|
|
|
|
}
|
|
|
|
|
Ok(Definition::Or {
|
|
|
|
|
pattern_0: std::boxed::Box::new(_tmp3),
|
|
|
|
|
pattern_1: std::boxed::Box::new(_tmp4),
|
|
|
|
@ -662,7 +683,7 @@ fn parse_definition_or<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_definition_and<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Definition<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_definition_and<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Definition<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_14_AND { return Err(_support::ParseError::conformance_error("schema.Definition::and")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -672,7 +693,10 @@ fn parse_definition_and<_Value: preserves::value::NestedValue>(_ctxt: &crate::ge
|
|
|
|
|
let _tmp3 = NamedPattern::parse(_ctxt, (&_tmp2[0]))?;
|
|
|
|
|
let _tmp4 = NamedPattern::parse(_ctxt, (&_tmp2[1]))?;
|
|
|
|
|
let mut _tmp5 = std::vec::Vec::new();
|
|
|
|
|
for _tmp6 in &_tmp2[2..] {let _tmp7 = NamedPattern::parse(_ctxt, _tmp6)?; _tmp5.push(_tmp7);}
|
|
|
|
|
for _tmp6 in &_tmp2[2..] {
|
|
|
|
|
let _tmp7 = NamedPattern::parse(_ctxt, _tmp6)?;
|
|
|
|
|
_tmp5.push(_tmp7);
|
|
|
|
|
}
|
|
|
|
|
Ok(Definition::And {
|
|
|
|
|
pattern_0: std::boxed::Box::new(_tmp3),
|
|
|
|
|
pattern_1: std::boxed::Box::new(_tmp4),
|
|
|
|
@ -680,13 +704,14 @@ fn parse_definition_and<_Value: preserves::value::NestedValue>(_ctxt: &crate::ge
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_definition_pattern<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Definition<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_definition_pattern<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Definition<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = Pattern::parse(_ctxt, value)?;
|
|
|
|
|
Ok(Definition::Pattern(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Definition<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Definition<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -695,8 +720,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Definition<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Definition<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
Definition::Or {pattern_0: _tmp0, pattern_1: _tmp1, pattern_n: _tmp2} => {
|
|
|
|
@ -706,7 +732,9 @@ impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Langua
|
|
|
|
|
let mut _tmp4 = std::vec::Vec::new();
|
|
|
|
|
_tmp4.push(_tmp0.as_ref().unparse(_ctxt));
|
|
|
|
|
_tmp4.push(_tmp1.as_ref().unparse(_ctxt));
|
|
|
|
|
for _tmp5 in _tmp2 {_tmp4.push(_tmp5.unparse(_ctxt));}
|
|
|
|
|
for _tmp5 in _tmp2 {
|
|
|
|
|
_tmp4.push(_tmp5.unparse(_ctxt));
|
|
|
|
|
}
|
|
|
|
|
preserves::value::Value::Sequence(_tmp4).wrap()
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
@ -719,7 +747,9 @@ impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Langua
|
|
|
|
|
let mut _tmp4 = std::vec::Vec::new();
|
|
|
|
|
_tmp4.push(_tmp0.as_ref().unparse(_ctxt));
|
|
|
|
|
_tmp4.push(_tmp1.as_ref().unparse(_ctxt));
|
|
|
|
|
for _tmp5 in _tmp2 {_tmp4.push(_tmp5.unparse(_ctxt));}
|
|
|
|
|
for _tmp5 in _tmp2 {
|
|
|
|
|
_tmp4.push(_tmp5.unparse(_ctxt));
|
|
|
|
|
}
|
|
|
|
|
preserves::value::Value::Sequence(_tmp4).wrap()
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
@ -754,8 +784,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Definitions<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Definitions<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let mut _tmp0 = preserves::value::Map::new();
|
|
|
|
|
for (_tmp1, _tmp2) in value.value().to_dictionary()? {
|
|
|
|
@ -767,8 +798,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Definitions<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Definitions<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_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()
|
|
|
|
@ -799,8 +831,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for DictionaryEntries<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for DictionaryEntries<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let mut _tmp0 = preserves::value::Map::new();
|
|
|
|
|
for (_tmp1, _tmp2) in value.value().to_dictionary()? {
|
|
|
|
@ -812,8 +845,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for DictionaryEntries<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for DictionaryEntries<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_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()
|
|
|
|
@ -854,19 +888,20 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_embedded_type_name_ref<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<EmbeddedTypeName, _support::ParseError> {
|
|
|
|
|
fn parse_embedded_type_name_ref<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<EmbeddedTypeName, _support::ParseError> {
|
|
|
|
|
let _tmp0 = Ref::parse(_ctxt, value)?;
|
|
|
|
|
Ok(EmbeddedTypeName::Ref(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_embedded_type_name_false<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<EmbeddedTypeName, _support::ParseError> {
|
|
|
|
|
fn parse_embedded_type_name_false<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<EmbeddedTypeName, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_15_FALSE { return Err(_support::ParseError::conformance_error("schema.EmbeddedTypeName::false")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(EmbeddedTypeName::False)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for EmbeddedTypeName {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for EmbeddedTypeName {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -874,8 +909,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for EmbeddedTypeName {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for EmbeddedTypeName {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
EmbeddedTypeName::Ref(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -905,23 +941,30 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for ModulePath {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for ModulePath {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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());}
|
|
|
|
|
for _tmp2 in &_tmp1[0..] {
|
|
|
|
|
let _tmp3 = _tmp2.value().to_symbol()?;
|
|
|
|
|
_tmp0.push(_tmp3.clone());
|
|
|
|
|
}
|
|
|
|
|
Ok(ModulePath(_tmp0))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for ModulePath {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for ModulePath {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let ModulePath(_tmp0) = self;
|
|
|
|
|
{
|
|
|
|
|
let mut _tmp1 = std::vec::Vec::new();
|
|
|
|
|
for _tmp2 in _tmp0 {_tmp1.push(preserves::value::Value::symbol(_tmp2).wrap());}
|
|
|
|
|
for _tmp2 in _tmp0 {
|
|
|
|
|
_tmp1.push(preserves::value::Value::symbol(_tmp2).wrap());
|
|
|
|
|
}
|
|
|
|
|
preserves::value::Value::Sequence(_tmp1).wrap()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -951,8 +994,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Modules<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Modules<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let mut _tmp0 = preserves::value::Map::new();
|
|
|
|
|
for (_tmp1, _tmp2) in value.value().to_dictionary()? {
|
|
|
|
@ -964,8 +1008,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Modules<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Modules<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_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()
|
|
|
|
@ -995,8 +1040,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for NamedAlternative<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for NamedAlternative<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let _tmp0 = value.value().to_sequence()?;
|
|
|
|
|
if _tmp0.len() < 2 { return Err(_support::ParseError::conformance_error("schema.NamedAlternative")); }
|
|
|
|
@ -1006,8 +1052,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for NamedAlternative<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for NamedAlternative<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let NamedAlternative {variant_label: _tmp0, pattern: _tmp1} = self;
|
|
|
|
|
{
|
|
|
|
@ -1046,18 +1093,19 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_named_pattern_named<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedPattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_named_pattern_named<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedPattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = Binding::parse(_ctxt, value)?;
|
|
|
|
|
Ok(NamedPattern::Named(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_named_pattern_anonymous<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedPattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_named_pattern_anonymous<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedPattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = Pattern::parse(_ctxt, value)?;
|
|
|
|
|
Ok(NamedPattern::Anonymous(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for NamedPattern<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for NamedPattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -1065,8 +1113,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for NamedPattern<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for NamedPattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
NamedPattern::Named(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -1102,18 +1151,19 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_named_simple_pattern_named<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedSimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_named_simple_pattern_named<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedSimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = Binding::parse(_ctxt, value)?;
|
|
|
|
|
Ok(NamedSimplePattern::Named(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_named_simple_pattern_anonymous<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedSimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_named_simple_pattern_anonymous<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<NamedSimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = SimplePattern::parse(_ctxt, value)?;
|
|
|
|
|
Ok(NamedSimplePattern::Anonymous(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for NamedSimplePattern<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for NamedSimplePattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -1121,8 +1171,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for NamedSimplePattern<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for NamedSimplePattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
NamedSimplePattern::Named(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -1158,18 +1209,19 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_pattern_simple_pattern<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Pattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_pattern_simple_pattern<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Pattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = SimplePattern::parse(_ctxt, value)?;
|
|
|
|
|
Ok(Pattern::SimplePattern(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_pattern_compound_pattern<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Pattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_pattern_compound_pattern<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<Pattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = CompoundPattern::parse(_ctxt, value)?;
|
|
|
|
|
Ok(Pattern::CompoundPattern(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Pattern<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Pattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -1177,8 +1229,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Pattern<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Pattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
Pattern::SimplePattern(_tmp0) => _tmp0.as_ref().unparse(_ctxt),
|
|
|
|
@ -1220,8 +1273,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Ref {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Ref {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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")); }
|
|
|
|
@ -1233,8 +1287,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Ref {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Ref {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Ref {module: _tmp0, name: _tmp1} = self;
|
|
|
|
|
{
|
|
|
|
@ -1313,8 +1368,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Schema<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Schema<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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")); }
|
|
|
|
@ -1331,8 +1387,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Schema<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Schema<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Schema {definitions: _tmp0, embedded_type: _tmp1, version: _tmp2} = self;
|
|
|
|
|
{
|
|
|
|
@ -1533,13 +1590,13 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_any<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_any<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
if value != &_ctxt.LIT_21_ANY { return Err(_support::ParseError::conformance_error("schema.SimplePattern::any")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
|
Ok(SimplePattern::Any)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_atom<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_atom<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_22_ATOM { return Err(_support::ParseError::conformance_error("schema.SimplePattern::atom")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1548,7 +1605,7 @@ fn parse_simple_pattern_atom<_Value: preserves::value::NestedValue>(_ctxt: &crat
|
|
|
|
|
Ok(SimplePattern::Atom {atom_kind: std::boxed::Box::new(_tmp2)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_embedded<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_embedded<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_23_EMBEDDED { return Err(_support::ParseError::conformance_error("schema.SimplePattern::embedded")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1557,7 +1614,7 @@ fn parse_simple_pattern_embedded<_Value: preserves::value::NestedValue>(_ctxt: &
|
|
|
|
|
Ok(SimplePattern::Embedded {interface: std::boxed::Box::new(_tmp2)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_lit<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_lit<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_24_LIT { return Err(_support::ParseError::conformance_error("schema.SimplePattern::lit")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1566,7 +1623,7 @@ fn parse_simple_pattern_lit<_Value: preserves::value::NestedValue>(_ctxt: &crate
|
|
|
|
|
Ok(SimplePattern::Lit {value: _tmp2.clone()})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_seqof<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_seqof<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_25_SEQOF { return Err(_support::ParseError::conformance_error("schema.SimplePattern::seqof")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1575,7 +1632,7 @@ fn parse_simple_pattern_seqof<_Value: preserves::value::NestedValue>(_ctxt: &cra
|
|
|
|
|
Ok(SimplePattern::Seqof {pattern: std::boxed::Box::new(_tmp2)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_setof<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_setof<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_26_SETOF { return Err(_support::ParseError::conformance_error("schema.SimplePattern::setof")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1584,7 +1641,7 @@ fn parse_simple_pattern_setof<_Value: preserves::value::NestedValue>(_ctxt: &cra
|
|
|
|
|
Ok(SimplePattern::Setof {pattern: std::boxed::Box::new(_tmp2)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_dictof<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_dictof<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = value.value().to_record(None)?;
|
|
|
|
|
if _tmp0.label() != &_ctxt.LIT_27_DICTOF { return Err(_support::ParseError::conformance_error("schema.SimplePattern::dictof")); }
|
|
|
|
|
let _tmp1 = ();
|
|
|
|
@ -1594,13 +1651,14 @@ fn parse_simple_pattern_dictof<_Value: preserves::value::NestedValue>(_ctxt: &cr
|
|
|
|
|
Ok(SimplePattern::Dictof {key: std::boxed::Box::new(_tmp2), value: std::boxed::Box::new(_tmp3)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn parse_simple_pattern_ref<_Value: preserves::value::NestedValue>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
fn parse_simple_pattern_ref<_Value: preserves::value::NestedValue + 'static>(_ctxt: &crate::gen::Language<_Value>, value: &_Value) -> std::result::Result<SimplePattern<_Value>, _support::ParseError> {
|
|
|
|
|
let _tmp0 = Ref::parse(_ctxt, value)?;
|
|
|
|
|
Ok(SimplePattern::Ref(std::boxed::Box::new(_tmp0)))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for SimplePattern<_Value> {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for SimplePattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_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); }
|
|
|
|
@ -1614,8 +1672,9 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for SimplePattern<_Value> {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for SimplePattern<_Value> {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
match self {
|
|
|
|
|
SimplePattern::Any => (&_ctxt.LIT_21_ANY).clone(),
|
|
|
|
@ -1674,8 +1733,9 @@ impl<'de, _Value: preserves::value::NestedValue, R: _support::Reader<'de, _Value
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language<_Value>, _Value> for Version {
|
|
|
|
|
fn parse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Parse<_Value> for Version {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn parse<'a, _LL: Into<&'a Self::Language>>(_ctxt: _LL, value: &_Value) -> std::result::Result<Self, _support::ParseError> where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
if value != &_ctxt.LIT_28_1 { return Err(_support::ParseError::conformance_error("schema.Version")); }
|
|
|
|
|
let _tmp0 = ();
|
|
|
|
@ -1683,6 +1743,11 @@ impl<_Value: preserves::value::NestedValue> _support::Parse<crate::gen::Language
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<_Value: preserves::value::NestedValue> _support::Unparse<crate::gen::Language<_Value>, _Value> for Version {
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a crate::gen::Language<_Value>>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {let _ctxt = _ctxt.into(); let Version = self; (&_ctxt.LIT_28_1).clone()}
|
|
|
|
|
impl<_Value: preserves::value::NestedValue + 'static> _support::Unparse<_Value> for Version {
|
|
|
|
|
type Language = crate::gen::Language<_Value>;
|
|
|
|
|
fn unparse<'a, _LL: Into<&'a Self::Language>>(&self, _ctxt: _LL) -> _Value where crate::gen::Language<_Value>: 'a {
|
|
|
|
|
let _ctxt = _ctxt.into();
|
|
|
|
|
let Version = self;
|
|
|
|
|
(&_ctxt.LIT_28_1).clone()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|