From 783c10067b6ae13391df82bbcdcacf3a1b2918f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Mon, 2 Jan 2023 20:53:14 +0100 Subject: [PATCH] Parser - Fixed parsing empty function parameters --- src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.rs b/src/parser.rs index 6614760..97428ff 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -200,7 +200,7 @@ impl Parser { )?; let params = { let mut params = Vec::new(); - if !self.check(&TokenType::RightParen) { + if self.expect(&[TokenType::RightParen]).is_none() { loop { if params.len() >= 255 { return Err(ParserError::new(