1
0

19 lines
357 B
Rust
Raw Normal View History

2023-11-30 02:09:55 -05:00
use crate::{Map, Result, Value};
2023-11-28 17:54:17 -05:00
mod fs;
mod output;
2023-11-30 02:09:55 -05:00
mod r#type;
2023-11-28 17:54:17 -05:00
2023-11-30 02:09:55 -05:00
pub const BUILT_IN_FUNCTIONS: [&dyn BuiltInFunction; 5] = [
&fs::Read,
&fs::Write,
&fs::Append,
&output::Output,
&r#type::Type,
];
2023-11-28 17:54:17 -05:00
pub trait BuiltInFunction {
fn name(&self) -> &'static str;
2023-11-30 02:09:55 -05:00
fn run(&self, arguments: &[Value], context: &Map) -> Result<Value>;
2023-11-28 17:54:17 -05:00
}