remove unused structs
This commit is contained in:
parent
0b38855ce4
commit
794fc93084
|
@ -28,46 +28,31 @@ use crate::{
|
||||||
tipo::Type,
|
tipo::Type,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::tree::{AirExpression, AirStatement, AirTree, TreePath};
|
||||||
air::Air,
|
|
||||||
tree::{AirExpression, AirStatement, AirTree, TreePath},
|
pub type Variant = String;
|
||||||
};
|
|
||||||
|
pub type Params = Vec<String>;
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum CodeGenFunction {
|
pub enum CodeGenFunction {
|
||||||
Function { body: AirTree, params: Vec<String> },
|
Function { body: AirTree, params: Params },
|
||||||
Link(String),
|
Link(Variant),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum HoistableFunction {
|
pub enum HoistableFunction {
|
||||||
Function {
|
Function {
|
||||||
body: AirTree,
|
body: AirTree,
|
||||||
deps: Vec<(FunctionAccessKey, String)>,
|
deps: Vec<(FunctionAccessKey, Variant)>,
|
||||||
params: Vec<String>,
|
params: Params,
|
||||||
},
|
},
|
||||||
CyclicFunction {
|
CyclicFunction {
|
||||||
functions: Vec<(Vec<String>, AirTree)>,
|
functions: Vec<(Params, AirTree)>,
|
||||||
deps: Vec<(FunctionAccessKey, String)>,
|
deps: Vec<(FunctionAccessKey, Variant)>,
|
||||||
},
|
},
|
||||||
Link((FunctionAccessKey, String)),
|
Link((FunctionAccessKey, Variant)),
|
||||||
CyclicLink((FunctionAccessKey, String)),
|
CyclicLink((FunctionAccessKey, Variant)),
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub struct FuncComponents {
|
|
||||||
pub ir: Vec<Air>,
|
|
||||||
pub dependencies: Vec<FunctionAccessKey>,
|
|
||||||
pub args: Vec<String>,
|
|
||||||
pub recursive: bool,
|
|
||||||
pub defined_by_zero_arg: bool,
|
|
||||||
pub is_code_gen_func: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Eq, Debug, PartialEq, Hash)]
|
|
||||||
pub struct ConstrFieldKey {
|
|
||||||
pub local_var: String,
|
|
||||||
pub field_name: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
|
@ -76,8 +61,6 @@ pub struct DataTypeKey {
|
||||||
pub defined_type: String,
|
pub defined_type: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type ConstrUsageKey = String;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
|
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
|
||||||
pub struct FunctionAccessKey {
|
pub struct FunctionAccessKey {
|
||||||
pub module_name: String,
|
pub module_name: String,
|
||||||
|
|
Loading…
Reference in New Issue