tamer: parse::prelude: Include Display, Debug, and Error-related exports
Cut down on the import boilerplate some more for `ParseState`s. DEV-13163main
parent
8685527feb
commit
8449a2b759
|
@ -34,7 +34,6 @@ use crate::{
|
|||
graph::object::{ObjectIndexRelTo, ObjectIndexTo},
|
||||
ObjectKind,
|
||||
},
|
||||
diagnose::Annotate,
|
||||
f::Functor,
|
||||
parse::prelude::*,
|
||||
};
|
||||
|
|
|
@ -26,10 +26,7 @@ use super::{
|
|||
ir::AirBindableMeta,
|
||||
AirAggregate, AirAggregateCtx,
|
||||
};
|
||||
use crate::{
|
||||
asg::graph::object::Meta, diagnose::Annotate, diagnostic_todo,
|
||||
parse::prelude::*,
|
||||
};
|
||||
use crate::{asg::graph::object::Meta, diagnostic_todo, parse::prelude::*};
|
||||
|
||||
/// Metasyntactic variable (metavariable) parser.
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
use super::{super::AsgError, ir::AirIdent, AirAggregate, AirAggregateCtx};
|
||||
use crate::parse::prelude::*;
|
||||
use std::fmt::Display;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum AirOpaqueAggregate {
|
||||
|
|
|
@ -26,7 +26,7 @@ use super::{
|
|||
ir::AirLiteratePkg,
|
||||
AirAggregate, AirAggregateCtx,
|
||||
};
|
||||
use crate::{diagnose::Annotate, diagnostic_todo, parse::prelude::*};
|
||||
use crate::{diagnostic_todo, parse::prelude::*};
|
||||
|
||||
/// Package parsing with support for loaded identifiers.
|
||||
///
|
||||
|
|
|
@ -26,12 +26,7 @@ use super::{
|
|||
ir::AirBindableTpl,
|
||||
AirAggregate, AirAggregateCtx,
|
||||
};
|
||||
use crate::{
|
||||
diagnose::Annotate,
|
||||
fmt::{DisplayWrapper, TtQuote},
|
||||
parse::prelude::*,
|
||||
span::Span,
|
||||
};
|
||||
use crate::{fmt::TtQuote, parse::prelude::*, span::Span};
|
||||
|
||||
/// Template parser and token aggregator.
|
||||
///
|
||||
|
|
|
@ -22,15 +22,13 @@
|
|||
use super::Nir;
|
||||
use crate::{
|
||||
asg::{air::Air, ExprOp},
|
||||
diagnose::{Annotate, Diagnostic},
|
||||
fmt::{DisplayWrapper, TtQuote},
|
||||
fmt::TtQuote,
|
||||
nir::{Nir::*, NirEntity::*},
|
||||
parse::prelude::*,
|
||||
span::Span,
|
||||
sym::{st::raw::U_TRUE, SymbolId},
|
||||
};
|
||||
use arrayvec::ArrayVec;
|
||||
use std::{error::Error, fmt::Display};
|
||||
|
||||
/// Dynamic [`NirToAir`] parser configuration.
|
||||
///
|
||||
|
|
|
@ -80,7 +80,7 @@ use arrayvec::ArrayVec;
|
|||
|
||||
use super::{Nir, NirEntity};
|
||||
use crate::{
|
||||
fmt::{DisplayWrapper, TtQuote},
|
||||
fmt::TtQuote,
|
||||
parse::prelude::*,
|
||||
span::Span,
|
||||
sym::{
|
||||
|
|
|
@ -58,8 +58,13 @@ pub mod prelude {
|
|||
TransitionResult, Transitionable,
|
||||
};
|
||||
|
||||
// Every `Token` must implement `Display`.
|
||||
pub use std::fmt::Display;
|
||||
// Every `Token`.
|
||||
pub use crate::fmt::DisplayWrapper;
|
||||
pub use std::fmt::{Debug, Display};
|
||||
|
||||
// Every `ParseState::Error`.
|
||||
pub use crate::diagnose::{Annotate, AnnotatedSpan, Diagnostic};
|
||||
pub use std::error::Error;
|
||||
}
|
||||
|
||||
/// A single datum from a streaming IR with an associated [`Span`].
|
||||
|
|
|
@ -106,7 +106,6 @@ use crate::{
|
|||
span::{Span, UNKNOWN_SPAN},
|
||||
xir::EleSpan,
|
||||
};
|
||||
use std::fmt::Display;
|
||||
|
||||
use XirfAutoClose::*;
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ use super::{
|
|||
CloseSpan, OpenSpan, QName, Token as XirToken, TokenStream,
|
||||
};
|
||||
use crate::{
|
||||
diagnose::{Annotate, AnnotatedSpan, Diagnostic},
|
||||
f::Functor,
|
||||
parse::prelude::*,
|
||||
span::Span,
|
||||
|
@ -54,11 +53,7 @@ use crate::{
|
|||
xir::EleSpan,
|
||||
};
|
||||
use arrayvec::ArrayVec;
|
||||
use std::{
|
||||
error::Error,
|
||||
fmt::{Debug, Display},
|
||||
marker::PhantomData,
|
||||
};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
// Used for organization.
|
||||
pub use accept::*;
|
||||
|
|
Loading…
Reference in New Issue