diff --git a/dust-lang/src/abstract_tree/built_in_function.rs b/dust-lang/src/abstract_tree/built_in_function.rs
index 7a156d6..ae6200a 100644
--- a/dust-lang/src/abstract_tree/built_in_function.rs
+++ b/dust-lang/src/abstract_tree/built_in_function.rs
@@ -1,4 +1,10 @@
-use std::{fs::read_to_string, io::stdin, thread::sleep, time::Duration};
+use std::{
+ fmt::{self, Display, Formatter},
+ fs::read_to_string,
+ io::stdin,
+ thread::sleep,
+ time::Duration,
+};
use serde::{Deserialize, Serialize};
use serde_json::from_str;
@@ -51,6 +57,21 @@ impl BuiltInFunction {
}
}
+impl Display for BuiltInFunction {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ let display = match self {
+ BuiltInFunction::Length => "__LENGTH__",
+ BuiltInFunction::ReadLine => "__READ_LINE__",
+ BuiltInFunction::ReadFile => "__READ_FILE__",
+ BuiltInFunction::Sleep => "__SLEEP__",
+ BuiltInFunction::WriteLine => "__WRITE_LINE__",
+ BuiltInFunction::JsonParse => "__JSON_PARSE__",
+ };
+
+ write!(f, "{display}")
+ }
+}
+
trait FunctionLogic {
fn r#type() -> Type;
fn call(context: &Context, manage_memory: bool) -> Result