aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-20 22:56:50 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-01-20 22:56:50 +0100
commit34fc35ce55fa31b30cbb3491b0bce9c2289abbdc (patch)
treec4b0b6f7d90005f43aaaade64dc2fb88169b54f0
parent914bc87fd0525ce042d279bff6a4c97477bfeb61 (diff)
downloadsylt-34fc35ce55fa31b30cbb3491b0bce9c2289abbdc.tar.gz
trailing comma on nextable enum
-rw-r--r--src/compiler.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index 727f177..e45e611 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -6,7 +6,7 @@ use crate::tokenizer::{Token, TokenStream};
use crate::vm::{Value, Block, Op};
macro_rules! nextable_enum {
- ( $name:ident { $( $thing:ident ),* } ) => {
+ ( $name:ident { $( $thing:ident ),* $( , )? } ) => {
#[derive(PartialEq, PartialOrd, Clone, Copy, Debug)]
enum $name {
$( $thing, )*
@@ -43,7 +43,7 @@ nextable_enum!(Prec {
Bool,
Comp,
Term,
- Factor
+ Factor,
});
#[derive(Debug, Clone)]