From 39ee74112c63ca7283e380b10cacd5cfc4de1f25 Mon Sep 17 00:00:00 2001 From: Ilya Lakhin Date: Sun, 9 Aug 2020 18:42:33 +0700 Subject: [PATCH] no-closure feature issue fixed --- src/parser.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser.rs b/src/parser.rs index a47f49e8..c16116a8 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1639,7 +1639,9 @@ fn parse_primary( // Function call Token::Identifier(s) if *next_token == Token::LeftParen || *next_token == Token::Bang => { // Once the identifier consumed we must enable next variables capturing - state.allow_capture = true; + #[cfg(not(feature = "no_closure"))] { + state.allow_capture = true; + } Expr::Variable(Box::new(((s, settings.pos), None, 0, None))) } // Normal variable access