Rename functions

This commit is contained in:
Jeff 2024-03-11 14:51:02 -04:00
parent 764ea0550d
commit bf72e779fe
3 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ impl AbstractTree for FunctionCall {
arguments.push(value); arguments.push(value);
} }
let function_context = Context::with_data_from(context)?; let function_context = Context::inherit_data_from(context)?;
function.call(arguments, function_context) function.call(arguments, function_context)
} }

View File

@ -78,7 +78,7 @@ impl AbstractTree for ValueNode {
body, body,
} = self } = self
{ {
let function_context = Context::with_types_from(context)?; let function_context = Context::inherit_types_from(context)?;
for (identifier, r#type) in parameters { for (identifier, r#type) in parameters {
function_context.set_type(identifier.clone(), r#type.clone())?; function_context.set_type(identifier.clone(), r#type.clone())?;

View File

@ -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(); let mut new_data = BTreeMap::new();
for (identifier, value_data) in other.inner.read()?.iter() { for (identifier, value_data) in other.inner.read()?.iter() {
@ -47,7 +47,7 @@ impl Context {
Ok(Self::with_data(new_data)) 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(); let mut new_data = BTreeMap::new();
for (identifier, value_data) in other.inner.read()?.iter() { for (identifier, value_data) in other.inner.read()?.iter() {