Skip to content

Commit

Permalink
🚨 Fix compiler warnings
Browse files Browse the repository at this point in the history
semver: chore
  • Loading branch information
Somfic committed Jun 12, 2024
1 parent 44fda9e commit cd75720
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/parser/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::{
};
use crate::{
parser::macros::expect_any_token,
scanner::lexeme::{Lexeme, Range, Token, TokenType},
scanner::lexeme::{Lexeme, TokenType},
};

pub fn parse(
Expand Down
3 changes: 2 additions & 1 deletion src/parser/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{
macros::{expect_expression, expect_token},
statement, typing, Diagnostic, Parser,
};
use crate::scanner::lexeme::{Lexeme, TokenType, TokenValue};
use crate::scanner::lexeme::{TokenType, TokenValue};
use core::panic;
use std::collections::HashMap;

Expand Down Expand Up @@ -79,6 +79,7 @@ impl Lookup {
self.type_lookup.insert(token, handler);
}

#[allow(dead_code)]
pub(crate) fn add_left_type_handler(&mut self, token: TokenType, handler: LeftTypeHandler) {
if self.left_type_lookup.contains_key(&token) {
panic!("Token already has a left type handler");
Expand Down
2 changes: 2 additions & 0 deletions src/parser/macros.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_macros)]
macro_rules! expect_statement {
($parser:expr, $cursor:expr) => {{
crate::parser::statement::parse($parser, $cursor)
Expand Down Expand Up @@ -127,6 +128,7 @@ macro_rules! expect_tokens {

pub(crate) use expect_any_token;
pub(crate) use expect_expression;
#[allow(unused_imports)]
pub(crate) use expect_statement;
pub(crate) use expect_token;
pub(crate) use expect_tokens;
Expand Down
4 changes: 1 addition & 3 deletions src/transpiler/bend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ impl Transpiler for BendTranspiler {
Symbol::Unknown(lexeme) => {
output.push_str(&format!("Unknown lexeme: {:?}", lexeme));
}
Symbol::Type(_) => {
output.push_str(format!("Type not supported").as_str());
}
Symbol::Type(_) => {}
}

output
Expand Down

0 comments on commit cd75720

Please sign in to comment.