Parser - Fixed parameter parsing bug
This commit is contained in:
parent
e963868aa7
commit
20aa06ac25
1 changed files with 2 additions and 2 deletions
|
@ -276,8 +276,8 @@ impl Parser {
|
||||||
if names.contains(&name.lexeme) {
|
if names.contains(&name.lexeme) {
|
||||||
return self.error_mv(format!("duplicate {} parameter", kind.name()));
|
return self.error_mv(format!("duplicate {} parameter", kind.name()));
|
||||||
}
|
}
|
||||||
names.insert(name.lexeme);
|
names.insert(name.lexeme.clone());
|
||||||
params.push(self.advance().clone());
|
params.push(name);
|
||||||
if self.expect(&[TokenType::Comma]).is_none() {
|
if self.expect(&[TokenType::Comma]).is_none() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue