Parse ConstExpr::Other
diff --git a/src/constant.rs b/src/constant.rs
index c7d0e32..d0f11b5 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -43,6 +43,8 @@
use lit::parsing::lit;
use op::parsing::{binop, unop};
use ty::parsing::{path, ty};
+ #[cfg(feature = "full")] use expr::parsing::expr;
+ #[cfg(not(feature = "full"))] use synom::IResult;
named!(pub const_expr -> ConstExpr, do_parse!(
mut e: alt!(
@@ -53,6 +55,8 @@
expr_path
|
expr_paren
+ |
+ expr_other
) >>
many0!(alt!(
tap!(args: and_call => {
@@ -94,6 +98,14 @@
named!(expr_path -> ConstExpr, map!(path, ConstExpr::Path));
+ #[cfg(feature = "full")]
+ named!(expr_other -> ConstExpr, map!(expr, ConstExpr::Other));
+
+ #[cfg(not(feature = "full"))]
+ fn expr_other(_: &str) -> IResult<&str, ConstExpr> {
+ IResult::Error
+ }
+
named!(and_index -> ConstExpr, delimited!(punct!("["), const_expr, punct!("]")));
named!(expr_paren -> ConstExpr, do_parse!(