From d32061ebba3bd73c1415ba1cf6f4e3f39376a4e3 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 2 Sep 2024 04:27:11 -0400 Subject: [PATCH] Clean up project imports --- dust-lang/src/dust_error.rs | 2 +- dust-lang/src/lexer.rs | 2 +- dust-lang/src/lib.rs | 2 +- dust-lang/src/type.rs | 2 +- dust-lang/src/vm.rs | 7 +++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dust-lang/src/dust_error.rs b/dust-lang/src/dust_error.rs index d6840f4..f34b398 100644 --- a/dust-lang/src/dust_error.rs +++ b/dust-lang/src/dust_error.rs @@ -2,7 +2,7 @@ use annotate_snippets::{Level, Renderer, Snippet}; use std::fmt::Display; -use crate::{ast::Span, AnalysisError, ContextError, LexError, ParseError, RuntimeError}; +use crate::{Span, AnalysisError, ContextError, LexError, ParseError, RuntimeError}; /// An error that occurred during the execution of the Dust language and its /// corresponding source code. diff --git a/dust-lang/src/lexer.rs b/dust-lang/src/lexer.rs index 51f73d9..5a68a61 100644 --- a/dust-lang/src/lexer.rs +++ b/dust-lang/src/lexer.rs @@ -5,7 +5,7 @@ //! - [`Lexer`], which lexes the input a token at a time use std::fmt::{self, Display, Formatter}; -use crate::{ast::Span, Token}; +use crate::{Span, Token}; /// Lexes the input and return a vector of tokens and their positions. /// diff --git a/dust-lang/src/lib.rs b/dust-lang/src/lib.rs index 2556826..cc74702 100644 --- a/dust-lang/src/lib.rs +++ b/dust-lang/src/lib.rs @@ -34,7 +34,7 @@ pub mod vm; pub use analyzer::{analyze, AnalysisError, Analyzer}; pub use ast::{AbstractSyntaxTree, AstError, Expression, Node, Span, Statement}; pub use built_in_function::{BuiltInFunction, BuiltInFunctionError}; -pub use constructor::Constructor; +pub use constructor::{ConstructError, Constructor}; pub use context::{Context, ContextData, ContextError}; pub use core_library::core_library; pub use dust_error::DustError; diff --git a/dust-lang/src/type.rs b/dust-lang/src/type.rs index ba14443..82ad9d6 100644 --- a/dust-lang/src/type.rs +++ b/dust-lang/src/type.rs @@ -17,7 +17,7 @@ use std::{ use serde::{Deserialize, Serialize}; -use crate::{constructor::Constructor, BuiltInFunction, Identifier}; +use crate::{Constructor, BuiltInFunction, Identifier}; /// Description of a kind of value. /// diff --git a/dust-lang/src/vm.rs b/dust-lang/src/vm.rs index 2305ee9..f0d72ec 100644 --- a/dust-lang/src/vm.rs +++ b/dust-lang/src/vm.rs @@ -20,10 +20,9 @@ use crate::{ OperatorExpression, PrimitiveValueExpression, RangeExpression, Span, Statement, StructDefinition, StructExpression, }, - constructor::ConstructError, - parse, Analyzer, BuiltInFunctionError, Context, ContextData, ContextError, DustError, - Evaluation, Expression, Function, FunctionCallError, Identifier, ParseError, StructType, Type, - Value, ValueData, ValueError, + parse, Analyzer, BuiltInFunctionError, ConstructError, Context, ContextData, ContextError, + DustError, Evaluation, Expression, Function, FunctionCallError, Identifier, ParseError, + StructType, Type, Value, ValueData, ValueError, }; /// Run the source code and return the result.