aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index e45e611..aca1b26 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -363,8 +363,6 @@ impl Compiler {
| Token::NotEqual
=> self.binary(block),
- Token::LeftParen => self.call(block),
-
_ => { return false; },
}
return true;
@@ -596,6 +594,9 @@ impl Compiler {
} else {
block.add(Op::ReadLocal(var.slot), self.line());
}
+ if self.peek() == Token::LeftParen {
+ self.call(block);
+ }
} else {
error!(self, format!("Using undefined variable {}.", name));
}