Skip to content

Commit 0b9fa10

Browse files
committed
Bump logos, rowan
1 parent ff39644 commit 0b9fa10

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

ergoscript-compiler/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ ergotree-ir = { workspace = true }
1818
derive_more = { workspace = true }
1919
num-derive = { workspace = true }
2020
num-traits = { workspace = true }
21-
logos = "0.12"
21+
logos = "0.15.1"
2222
text-size = "1.1.0"
23-
rowan = "0.12.1"
23+
rowan = "0.16.1"
2424
drop_bomb = "0.1.5"
2525
line-col = "0.2.1"
2626

ergoscript-compiler/src/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<'a> Iterator for Lexer<'a> {
2424
type Item = Token<'a>;
2525

2626
fn next(&mut self) -> Option<Self::Item> {
27-
let kind = self.inner.next()?;
27+
let kind = self.inner.next()?.ok()?;
2828
let text = self.inner.slice();
2929

3030
let range = {

ergoscript-compiler/src/lexer/token_kind.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ pub enum TokenKind {
5555

5656
#[regex("//.*")]
5757
Comment,
58-
59-
#[error]
60-
Error,
6158
}
6259

6360
impl TokenKind {
@@ -86,7 +83,6 @@ impl fmt::Display for TokenKind {
8683
Self::LBrace => "‘{’",
8784
Self::RBrace => "‘}’",
8885
Self::Comment => "comment",
89-
Self::Error => "an unrecognized token",
9086
})
9187
}
9288
}

ergoscript-compiler/src/syntax.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::lexer::TokenKind;
44
use num_derive::{FromPrimitive, ToPrimitive};
55
use num_traits::{FromPrimitive, ToPrimitive};
66

7-
#[derive(Debug, Copy, Clone, PartialEq, Eq, FromPrimitive, ToPrimitive)]
7+
#[derive(Debug, Copy, Clone, PartialEq, Eq, FromPrimitive, ToPrimitive, Hash, PartialOrd, Ord)]
88
pub enum SyntaxKind {
99
Whitespace,
1010
FnKw,
@@ -50,7 +50,6 @@ impl From<TokenKind> for SyntaxKind {
5050
TokenKind::LBrace => Self::LBrace,
5151
TokenKind::RBrace => Self::RBrace,
5252
TokenKind::Comment => Self::Comment,
53-
TokenKind::Error => Self::Error,
5453
TokenKind::And => Self::And,
5554
}
5655
}

0 commit comments

Comments
 (0)