From bf72e779feeed3950c84ccfc413171ce0c017c33 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 11 Mar 2024 14:51:02 -0400 Subject: [PATCH] Rename functions --- src/abstract_tree/function_call.rs | 2 +- src/abstract_tree/value_node.rs | 2 +- src/context.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/abstract_tree/function_call.rs b/src/abstract_tree/function_call.rs index 548421f..c59c163 100644 --- a/src/abstract_tree/function_call.rs +++ b/src/abstract_tree/function_call.rs @@ -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) } diff --git a/src/abstract_tree/value_node.rs b/src/abstract_tree/value_node.rs index 8ddb0b6..98b2ea4 100644 --- a/src/abstract_tree/value_node.rs +++ b/src/abstract_tree/value_node.rs @@ -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())?; diff --git a/src/context.rs b/src/context.rs index 3bbccb3..fe97c4f 100644 --- a/src/context.rs +++ b/src/context.rs @@ -33,7 +33,7 @@ impl Context { } } - pub fn with_types_from(other: &Context) -> Result { + pub fn inherit_types_from(other: &Context) -> Result { 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 { + pub fn inherit_data_from(other: &Context) -> Result { let mut new_data = BTreeMap::new(); for (identifier, value_data) in other.inner.read()?.iter() {