mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 23:23:50 +03:00
part revert clippy, fix parser
This commit is contained in:
parent
ac57fe6410
commit
acf5e1dc08
@ -314,9 +314,9 @@ impl ParserContext {
|
||||
pub fn parse_definition_statement(&mut self) -> SyntaxResult<DefinitionStatement> {
|
||||
let declare = self.expect_oneof(&[Token::Let, Token::Const])?;
|
||||
let mut variable_names = Vec::new();
|
||||
variable_names.push(self.parse_variable_name(&declare)?);
|
||||
|
||||
if self.eat(Token::LeftParen).is_some() {
|
||||
variable_names.push(self.parse_variable_name(&declare)?);
|
||||
let mut eaten_ending = false;
|
||||
while self.eat(Token::Comma).is_some() {
|
||||
if self.eat(Token::RightParen).is_some() {
|
||||
@ -328,6 +328,8 @@ impl ParserContext {
|
||||
if !eaten_ending {
|
||||
self.expect(Token::RightParen)?;
|
||||
}
|
||||
} else {
|
||||
variable_names.push(self.parse_variable_name(&declare)?);
|
||||
}
|
||||
|
||||
let type_ = if self.eat(Token::Colon).is_some() {
|
||||
|
Loading…
Reference in New Issue
Block a user