aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index 46fe38c..c4f687f 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -691,6 +691,14 @@ impl Compiler {
Token::Newline => {
self.eat();
}
+ Token::Comma => {
+ //TODO(gu): This creates a lot of syntax errors since the compiler panic is
+ // ignored and the statement is tried as a grouping instead, even though we
+ // _know_ that this can't be parsed as a grouping either.
+ // Tracked in #100.
+ error!(self, "Tuples must begin with an element or ')'.");
+ return;
+ }
_ => {
self.expression(block);
num_args += 1;