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 a2acd63 commit 474c106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/parser/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ macro_rules! expect_any_token {
}};
}

#[allow(unused_macros)]
macro_rules! expect_optional_token {
($parser:expr, $cursor:expr, $token_type:expr) => {{
let result = expect_token!($parser, $cursor, $token_type);
Expand Down Expand Up @@ -135,6 +136,7 @@ macro_rules! expect_tokens {

pub(crate) use expect_any_token;
pub(crate) use expect_expression;
#[allow(unused_imports)]
pub(crate) use expect_optional_token;
#[allow(unused_imports)]
pub(crate) use expect_statement;
Expand Down
7 changes: 2 additions & 5 deletions src/parser/statement.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use core::panic;
use std::collections::HashMap;

use crate::{
parser::macros::expect_optional_token,
scanner::lexeme::{Lexeme, Range, TokenType, TokenValue},
};
use crate::scanner::lexeme::{Lexeme, Range, TokenType, TokenValue};

use super::{
ast::Type,
Expand Down Expand Up @@ -114,7 +111,7 @@ pub fn parse_struct(parser: &Parser, cursor: usize) -> Result<(Statement, usize)
}
};

// TODO: Handle warning for overwritten member
// TODO: Handle warning for overwritten member
members.insert(member_name, member_type);

new_cursor = cursor;
Expand Down

0 comments on commit 474c106

Please sign in to comment.