Add no_object feature to disable objects.

This commit is contained in:
Stephen Chung
2020-03-29 17:15:12 +08:00
parent a8a4ed2967
commit ef6c6ea6d2
16 changed files with 71 additions and 15 deletions

View File

@@ -334,6 +334,7 @@ fn optimize_expr<'a>(expr: Expr, state: &mut State<'a>) -> Expr {
expr => Expr::Assignment(id, Box::new(optimize_expr(expr, state)), pos),
},
// lhs.rhs
#[cfg(not(feature = "no_object"))]
Expr::Dot(lhs, rhs, pos) => Expr::Dot(
Box::new(optimize_expr(*lhs, state)),
Box::new(optimize_expr(*rhs, state)),