Tentative beginning to implementing Parse for Expr types
diff --git a/src/expr.rs b/src/expr.rs
index a5f0e3a..35bb3ea 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1910,6 +1910,17 @@
}
#[cfg(feature = "full")]
+ impl Parse for ExprRange {
+ fn parse(input: ParseStream) -> Result<Self> {
+ let expr: Expr = input.parse()?;
+ match expr {
+ Expr::Range(expr_range) => Ok(expr_range),
+ _ => Err(input.error("expected range expression"))
+ }
+ }
+ }
+
+ #[cfg(feature = "full")]
fn expr_try_block(input: ParseStream) -> Result<ExprTryBlock> {
Ok(ExprTryBlock {
attrs: Vec::new(),