aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs11
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(());
}
}
}