Move type module out of abstract tree module
This commit is contained in:
parent
3fae807d9f
commit
2f06b18c3c
@ -14,7 +14,6 @@ pub mod map_index;
|
||||
pub mod math;
|
||||
pub mod statement;
|
||||
pub mod structure_definition;
|
||||
pub mod r#type;
|
||||
pub mod type_alias;
|
||||
pub mod type_constructor;
|
||||
pub mod r#use;
|
||||
@ -45,7 +44,6 @@ pub use self::{
|
||||
math::Math,
|
||||
r#as::As,
|
||||
r#loop::Loop,
|
||||
r#type::Type,
|
||||
r#use::Use,
|
||||
r#while::While,
|
||||
statement::Statement,
|
||||
@ -58,6 +56,7 @@ pub use self::{
|
||||
use crate::{
|
||||
context::Context,
|
||||
error::{DustError, RuntimeError, ValidationError},
|
||||
r#type::Type,
|
||||
Value,
|
||||
};
|
||||
|
||||
|
@ -9,12 +9,12 @@ use log::trace;
|
||||
use rand::random;
|
||||
|
||||
use crate::{
|
||||
abstract_tree::{SourcePosition, Type},
|
||||
abstract_tree::SourcePosition,
|
||||
error::{PoisonError, ValidationError},
|
||||
identifier::Identifier,
|
||||
standard_library::core_context,
|
||||
value::ValueInner,
|
||||
Value,
|
||||
Type, Value,
|
||||
};
|
||||
|
||||
type VariableInfo = (VariableData, UsageData, SourcePosition);
|
||||
|
@ -3,9 +3,10 @@ use std::{io, sync::PoisonError as StdPoisonError};
|
||||
use chumsky::{prelude::Rich, span::Span};
|
||||
|
||||
use crate::{
|
||||
abstract_tree::{r#type::Type, Expression, SourcePosition, TypeConstructor},
|
||||
abstract_tree::{Expression, SourcePosition, TypeConstructor},
|
||||
identifier::Identifier,
|
||||
lexer::Token,
|
||||
Type,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
@ -15,11 +15,12 @@ pub mod interpreter;
|
||||
pub mod lexer;
|
||||
pub mod parser;
|
||||
pub mod standard_library;
|
||||
pub mod r#type;
|
||||
pub mod value;
|
||||
|
||||
pub use abstract_tree::Type;
|
||||
pub use context::Context;
|
||||
pub use interpreter::{interpret, Interpreter, InterpreterError};
|
||||
pub use lexer::{lex, lexer};
|
||||
pub use parser::{parse, parser};
|
||||
pub use r#type::Type;
|
||||
pub use value::Value;
|
||||
|
@ -15,10 +15,11 @@ use serde::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
abstract_tree::{AbstractNode, Block, BuiltInFunction, Evaluation, SourcePosition, Type},
|
||||
abstract_tree::{AbstractNode, Block, BuiltInFunction, Evaluation, SourcePosition},
|
||||
context::Context,
|
||||
error::{RuntimeError, ValidationError},
|
||||
identifier::Identifier,
|
||||
Type,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
@ -1,10 +1,9 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use dust_lang::{
|
||||
abstract_tree::Type,
|
||||
error::{DustError, TypeConflict, ValidationError},
|
||||
identifier::Identifier,
|
||||
*,
|
||||
Type, *,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
@ -1,7 +1,7 @@
|
||||
use dust_lang::{
|
||||
abstract_tree::{Block, Expression, Statement, Type, WithPos},
|
||||
abstract_tree::{Block, Expression, Statement, WithPos},
|
||||
identifier::Identifier,
|
||||
*,
|
||||
Type, *,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user