diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-08 00:15:46 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-03-08 00:16:13 +0100 |
| commit | 8e2c0e345facee83d63991dda548b71e6a0c4cf6 (patch) | |
| tree | 86ead8f6a3329ff1999af49570c44df50ecf7461 /src | |
| parent | dc25e664305ed49edff4e45eaec6ed1fad910c60 (diff) | |
| download | sylt-8e2c0e345facee83d63991dda548b71e6a0c4cf6.tar.gz | |
error on '(,)'-tuples
Currently creats a lot of syntax errors. See #100.
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler.rs | 8 |
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; |
