tamer: asg: Move {expr,ident} into object/

Starting to re-organize things to match my mental model of the new system;
the ASG abstraction has changed quite a bit since the early days.

This isn't quite enough, though; see next commit.

DEV-13597
main
Mike Gerwitz 2023-01-17 22:48:19 -05:00
parent c9746230ef
commit cdfe9083f8
5 changed files with 14 additions and 8 deletions

View File

@ -64,21 +64,21 @@
//! if either identifier has not yet been declared. //! if either identifier has not yet been declared.
mod error; mod error;
mod expr;
mod graph; mod graph;
mod ident;
mod object; mod object;
pub mod air; pub mod air;
pub use error::AsgError; pub use error::AsgError;
pub use expr::{Expr, ExprDim, ExprOp};
pub use graph::{Asg, AsgResult, IndexType}; pub use graph::{Asg, AsgResult, IndexType};
pub use ident::{ pub use object::{
FragmentText, Ident, IdentKind, Source, TransitionError, TransitionResult, expr::{Expr, ExprDim, ExprOp},
UnresolvedError, ident::{
FragmentText, Ident, IdentKind, Source, TransitionError,
TransitionResult, UnresolvedError,
},
Object, ObjectIndex, ObjectKind,
}; };
pub use object::{Object, ObjectIndex, ObjectKind};
/// Default concrete ASG implementation. /// Default concrete ASG implementation.
pub type DefaultAsg = graph::Asg; pub type DefaultAsg = graph::Asg;

View File

@ -71,6 +71,9 @@ use crate::{
use petgraph::graph::NodeIndex; use petgraph::graph::NodeIndex;
use std::{convert::Infallible, fmt::Display, marker::PhantomData}; use std::{convert::Infallible, fmt::Display, marker::PhantomData};
pub mod expr;
pub mod ident;
/// An object on the ASG. /// An object on the ASG.
/// ///
/// See the [module-level documentation](super) for more information. /// See the [module-level documentation](super) for more information.

View File

@ -19,7 +19,10 @@
//! Identifiers (a type of [object][super::object]). //! Identifiers (a type of [object][super::object]).
use super::{object::ObjectRelTo, Asg, AsgError, ObjectIndex, ObjectKind}; use super::{
super::{Asg, AsgError, ObjectIndex, ObjectKind},
ObjectRelTo,
};
use crate::{ use crate::{
diagnose::{Annotate, Diagnostic}, diagnose::{Annotate, Diagnostic},
f::Functor, f::Functor,