Fixed range
This commit is contained in:
@@ -71,8 +71,6 @@ pub enum Postfix {
|
||||
StructCall(Vec<(Identifier, Expression)>),
|
||||
Index(Expression),
|
||||
As(TypeExpr),
|
||||
RangeInclusive,
|
||||
RangeExclusive,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
@@ -83,8 +81,6 @@ pub enum Prefix {
|
||||
New(Option<Generics>),
|
||||
Not,
|
||||
Neg,
|
||||
RangeInclusive,
|
||||
RangeExclusive,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
||||
@@ -504,9 +504,6 @@ as_px = {
|
||||
"as" ~ type_expr
|
||||
}
|
||||
|
||||
range_end_inc_px = { "..=" }
|
||||
range_end_exc_px = { ".." }
|
||||
|
||||
postfix = {
|
||||
field_px
|
||||
| call_px
|
||||
@@ -514,8 +511,6 @@ postfix = {
|
||||
| struct_px
|
||||
| index_px
|
||||
| as_px
|
||||
| range_end_inc_px
|
||||
| range_end_exc_px
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
@@ -528,8 +523,6 @@ ref_px = { "&" }
|
||||
new_px = { "new" ~ generics? }
|
||||
not_px = { "!" }
|
||||
neg_px = { "-" }
|
||||
range_start_inc_px = { "..=" }
|
||||
range_start_exc_px = { ".." }
|
||||
|
||||
prefix = {
|
||||
deref_px
|
||||
@@ -538,8 +531,6 @@ prefix = {
|
||||
| new_px
|
||||
| not_px
|
||||
| neg_px
|
||||
| range_start_inc_px
|
||||
| range_start_exc_px
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
||||
@@ -140,8 +140,6 @@ impl<'a> TryFrom<pest::iterators::Pair<'a, Rule>> for Prefix {
|
||||
),
|
||||
Rule::not_px => Self::Not,
|
||||
Rule::neg_px => Self::Neg,
|
||||
Rule::range_start_inc_px => Self::RangeInclusive,
|
||||
Rule::range_start_exc_px => Self::RangeExclusive,
|
||||
|
||||
_ => return AstError::bug_unimplemented(pair),
|
||||
})
|
||||
@@ -185,9 +183,6 @@ impl<'a> TryFrom<pest::iterators::Pair<'a, Rule>> for Postfix {
|
||||
ast_expr!(Postfix::As(inner.next().unwrap().try_into()))
|
||||
}
|
||||
|
||||
Rule::range_end_inc_px => Ok(Postfix::RangeInclusive),
|
||||
Rule::range_end_exc_px => Ok(Postfix::RangeExclusive),
|
||||
|
||||
_ => AstError::bug_unimplemented(pair),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user