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) {
|
||||
return self.error_mv(format!("duplicate {} parameter", kind.name()));
|
||||
}
|
||||
names.insert(name.lexeme);
|
||||
params.push(self.advance().clone());
|
||||
names.insert(name.lexeme.clone());
|
||||
params.push(name);
|
||||
if self.expect(&[TokenType::Comma]).is_none() {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue