Rename functions
This commit is contained in:
parent
764ea0550d
commit
bf72e779fe
@ -48,7 +48,7 @@ impl AbstractTree for FunctionCall {
|
||||
arguments.push(value);
|
||||
}
|
||||
|
||||
let function_context = Context::with_data_from(context)?;
|
||||
let function_context = Context::inherit_data_from(context)?;
|
||||
|
||||
function.call(arguments, function_context)
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ impl AbstractTree for ValueNode {
|
||||
body,
|
||||
} = self
|
||||
{
|
||||
let function_context = Context::with_types_from(context)?;
|
||||
let function_context = Context::inherit_types_from(context)?;
|
||||
|
||||
for (identifier, r#type) in parameters {
|
||||
function_context.set_type(identifier.clone(), r#type.clone())?;
|
||||
|
@ -33,7 +33,7 @@ impl Context {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_types_from(other: &Context) -> Result<Self, RwLockPoisonError> {
|
||||
pub fn inherit_types_from(other: &Context) -> Result<Self, RwLockPoisonError> {
|
||||
let mut new_data = BTreeMap::new();
|
||||
|
||||
for (identifier, value_data) in other.inner.read()?.iter() {
|
||||
@ -47,7 +47,7 @@ impl Context {
|
||||
Ok(Self::with_data(new_data))
|
||||
}
|
||||
|
||||
pub fn with_data_from(other: &Context) -> Result<Self, RwLockPoisonError> {
|
||||
pub fn inherit_data_from(other: &Context) -> Result<Self, RwLockPoisonError> {
|
||||
let mut new_data = BTreeMap::new();
|
||||
|
||||
for (identifier, value_data) in other.inner.read()?.iter() {
|
||||
|
Loading…
Reference in New Issue
Block a user