From 9b5c3629c08e494b86b6f6e7254a8d360ed860dd Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Thu, 21 Oct 2021 12:37:29 -0700 Subject: [PATCH] Update schala-lang to edition 2021 --- schala-lang/language/Cargo.toml | 3 +-- schala-lang/language/src/parsing/mod.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/schala-lang/language/Cargo.toml b/schala-lang/language/Cargo.toml index 994a486..3794ffe 100644 --- a/schala-lang/language/Cargo.toml +++ b/schala-lang/language/Cargo.toml @@ -2,8 +2,7 @@ name = "schala-lang" version = "0.1.0" authors = ["greg "] -edition = "2018" -resolver = "2" +edition = "2021" [dependencies] itertools = "0.10" diff --git a/schala-lang/language/src/parsing/mod.rs b/schala-lang/language/src/parsing/mod.rs index 08a881f..91d9e7e 100644 --- a/schala-lang/language/src/parsing/mod.rs +++ b/schala-lang/language/src/parsing/mod.rs @@ -308,13 +308,13 @@ macro_rules! expect { } macro_rules! delimited { - ($self:expr, $start:pat, $parse_fn:ident, $( $delim:pat )|+, $end:pat, nonstrict) => { - delimited!($self, $start, $parse_fn, $( $delim )|*, $end, false) + ($self:expr, $start:pat, $parse_fn:ident, $delim:pat, $end:pat, nonstrict) => { + delimited!($self, $start, $parse_fn, $delim, $end, false) }; - ($self:expr, $start:pat, $parse_fn:ident, $( $delim:pat )|+, $end:pat) => { - delimited!($self, $start, $parse_fn, $( $delim )|*, $end, true) + ($self:expr, $start:pat, $parse_fn:ident, $delim:pat, $end:pat) => { + delimited!($self, $start, $parse_fn, $delim, $end, true) }; - ($self:expr, $start:pat, $parse_fn:ident, $( $delim:pat )|+, $end:pat, $strictness:expr) => { + ($self:expr, $start:pat, $parse_fn:ident, $delim:pat, $end:pat, $strictness:expr) => { { expect!($self, $start); let mut acc = vec![]; @@ -326,13 +326,13 @@ macro_rules! delimited { } if !$strictness { match peek.get_kind() { - $( $delim )|* => { $self.token_handler.next(); continue }, + $delim => { $self.token_handler.next(); continue }, _ => () } } acc.push($self.$parse_fn()?); match $self.token_handler.peek().get_kind() { - $( $delim )|* => { $self.token_handler.next(); continue }, + $delim => { $self.token_handler.next(); continue }, _ if $strictness => break, _ => continue, };