no-closure feature issue fixed

This commit is contained in:
Ilya Lakhin 2020-08-09 18:42:33 +07:00
parent 20cff87e14
commit 39ee74112c

View File

@ -1639,7 +1639,9 @@ fn parse_primary(
// Function call // Function call
Token::Identifier(s) if *next_token == Token::LeftParen || *next_token == Token::Bang => { Token::Identifier(s) if *next_token == Token::LeftParen || *next_token == Token::Bang => {
// Once the identifier consumed we must enable next variables capturing // Once the identifier consumed we must enable next variables capturing
#[cfg(not(feature = "no_closure"))] {
state.allow_capture = true; state.allow_capture = true;
}
Expr::Variable(Box::new(((s, settings.pos), None, 0, None))) Expr::Variable(Box::new(((s, settings.pos), None, 0, None)))
} }
// Normal variable access // Normal variable access