diff options
| -rw-r--r-- | src/compiler.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/compiler.rs b/src/compiler.rs index 0ddae1a..f4bec9a 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -358,14 +358,11 @@ impl Compiler { _ => { self.expression(block); num_args += 1; - if self.peek() == Token::Comma { - self.eat(); - continue; - } - if self.peek() == Token::RightParen { - continue; + match self.peek() { + Token::Comma => { self.eat(); }, + Token::RightParen => {}, + _ => { return Err(()); }, } - return Err(()); } } } |
