Skip to content

Commit

Permalink
cleanup for orphaned imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhrzg committed Dec 12, 2024
1 parent 59b5394 commit f1bb7fa
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/common_token_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::token::{Token, TOKEN_DEFAULT_CHANNEL, TOKEN_INVALID_TYPE};
use crate::token_factory::TokenFactory;
use crate::token_source::TokenSource;
use crate::token_stream::{TokenStream, UnbufferedTokenStream};
use better_any::{Tid, TidAble};

/// Default token stream that skips token that not correspond to current channel.
#[derive(Debug)]
Expand Down
1 change: 0 additions & 1 deletion src/input_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::char_stream::{CharStream, InputData};
use crate::int_stream::IntStream;
use std::ops::Deref;

use better_any::TidAble;

/// Default rust target input stream.
///
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::tree::{ErrorNode, Listenable, ParseTreeListener, TerminalNode};
use crate::utils::cell_update;
use crate::vocabulary::Vocabulary;
use crate::{CoerceFrom, CoerceTo};
use better_any::{Tid, TidAble};
use better_any::TidAble;

/// parser functionality required for `ParserATNSimulator` to work
#[allow(missing_docs)] // todo rewrite it so downstream crates actually could meaningfully implement it
Expand Down
2 changes: 1 addition & 1 deletion src/rule_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::parser::ParserNodeType;
use crate::parser_rule_context::ParserRuleContext;
use crate::token_factory::TokenFactory;
use crate::tree::{ParseTree, Tree};
use better_any::{Tid, TidAble};
use better_any::TidAble;
use std::any::type_name;

//pub trait RuleContext:RuleNode {
Expand Down
2 changes: 1 addition & 1 deletion src/token_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use typed_arena::Arena;
use crate::char_stream::{CharStream, InputData};
use crate::token::Token;
use crate::token::{CommonToken, OwningToken, TOKEN_INVALID_TYPE};
use better_any::{Tid, TidAble};
use better_any::TidAble;

lazy_static! {
pub(crate) static ref COMMON_TOKEN_FACTORY_DEFAULT: Box<CommonTokenFactory> =
Expand Down
1 change: 0 additions & 1 deletion src/token_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::int_stream::{IntStream, IterWrapper};
use crate::token::{OwningToken, Token, TOKEN_EOF, TOKEN_INVALID_TYPE};
use crate::token_factory::TokenFactory;
use crate::token_source::TokenSource;
use better_any::{Tid, TidAble};
use std::fmt::{Debug, Formatter};

/// An `IntSteam` of `Token`s
Expand Down
4 changes: 1 addition & 3 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ use std::marker::PhantomData;
use std::ops::Deref;
use std::rc::Rc;

use crate::atn::INVALID_ALT;
use crate::char_stream::InputData;
use crate::int_stream::EOF;
use crate::interval_set::Interval;
use crate::parser::ParserNodeType;
use crate::parser_rule_context::{ParserRuleContext, RuleContextExt};
use crate::parser_rule_context::ParserRuleContext;
use crate::recognizer::Recognizer;
use crate::rule_context::{CustomRuleContext, RuleContext};
use crate::token::Token;
use crate::token_factory::TokenFactory;
use crate::{interval_set, trees, CoerceTo};
use better_any::{Tid, TidAble};
use std::mem;

//todo try to make in more generic
Expand Down

0 comments on commit f1bb7fa

Please sign in to comment.