Parser - Fixed parsing empty function parameters

This commit is contained in:
Emmanuel BENOîT 2023-01-02 20:53:14 +01:00
parent 12b2855fb1
commit 783c10067b

View file

@ -200,7 +200,7 @@ impl Parser {
)?; )?;
let params = { let params = {
let mut params = Vec::new(); let mut params = Vec::new();
if !self.check(&TokenType::RightParen) { if self.expect(&[TokenType::RightParen]).is_none() {
loop { loop {
if params.len() >= 255 { if params.len() >= 255 {
return Err(ParserError::new( return Err(ParserError::new(