mirror of
https://github.com/edg-l/PascalMLIR.git
synced 2024-10-18 06:53:47 +00:00
ok
This commit is contained in:
parent
2cd380e931
commit
cb85932b5d
|
@ -107,7 +107,7 @@ pub SubRangeType: ast::Type<'input> = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayIndexCompatibleType: ast::Type<'input> = {
|
OrdinalType: ast::Type<'input> = {
|
||||||
<SimpleType> => ast::Type::Simple(<>),
|
<SimpleType> => ast::Type::Simple(<>),
|
||||||
<SubRangeType> => <>,
|
<SubRangeType> => <>,
|
||||||
}
|
}
|
||||||
|
@ -126,11 +126,11 @@ RecordFixedPart: ast::RecordFixedPart<'input> = {
|
||||||
}
|
}
|
||||||
|
|
||||||
VariantSelector: ast::VariantSelector<'input> = {
|
VariantSelector: ast::VariantSelector<'input> = {
|
||||||
<tag_field:"identifier"> ":" <tag_type:Type> => ast::VariantSelector {
|
<tag_field:"identifier"> ":" <tag_type:OrdinalType> => ast::VariantSelector {
|
||||||
tag_field: Some(tag_field),
|
tag_field: Some(tag_field),
|
||||||
tag_type: Box::new(tag_type)
|
tag_type: Box::new(tag_type)
|
||||||
},
|
},
|
||||||
<tag_type:Type> => ast::VariantSelector {
|
<tag_type:OrdinalType> => ast::VariantSelector {
|
||||||
tag_field: None,
|
tag_field: None,
|
||||||
tag_type: Box::new(tag_type)
|
tag_type: Box::new(tag_type)
|
||||||
},
|
},
|
||||||
|
@ -166,20 +166,19 @@ RecordFieldList: ast::RecordFieldList<'input> = {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub Type: ast::Type<'input> = {
|
pub Type: ast::Type<'input> = {
|
||||||
<p:"packed"?> "array" "[" <index:CommaNoTrailing<ArrayIndexCompatibleType>> "]" "of" <c:Type> => ast::Type::Array {
|
<p:"packed"?> "record" <field_list:RecordFieldList?> "end" => ast::Type::Record {
|
||||||
|
field_list: None,
|
||||||
|
packed: p.is_some(),
|
||||||
|
},
|
||||||
|
<p:"packed"?> "array" "[" <index:CommaNoTrailing<OrdinalType>> "]" "of" <c:Type> => ast::Type::Array {
|
||||||
index,
|
index,
|
||||||
component: Box::new(c),
|
component: Box::new(c),
|
||||||
packed: p.is_some(),
|
packed: p.is_some(),
|
||||||
},
|
},
|
||||||
<SimpleType> => ast::Type::Simple(<>),
|
<SimpleType> => ast::Type::Simple(<>),
|
||||||
<"identifier"> => ast::Type::Identifier(<>),
|
|
||||||
<EnumeratedType> => ast::Type::Enumerated(<>),
|
<EnumeratedType> => ast::Type::Enumerated(<>),
|
||||||
<SubRangeType> => <>,
|
<SubRangeType> => <>,
|
||||||
// fixme
|
<"identifier"> => ast::Type::Identifier(<>),
|
||||||
<p:"packed"?> "record" <field_list:RecordFieldList?> "end" => ast::Type::Record {
|
|
||||||
field_list,
|
|
||||||
packed: p.is_some(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub TypeDef: ast::TypeDef<'input> = {
|
pub TypeDef: ast::TypeDef<'input> = {
|
||||||
|
|
Loading…
Reference in a new issue