dust/dust-lang/src/abstract_tree/built_in_function_call.rs

36 lines
775 B
Rust
Raw Normal View History

2024-04-21 21:00:08 +00:00
use std::{
fmt::{self, Display, Formatter},
io::stdin,
thread,
time::Duration,
};
use crate::{
abstract_tree::{Action, Type},
context::Context,
error::RuntimeError,
};
use super::{AbstractNode, Expression, WithPosition};
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
pub enum BuiltInFunctionCall {
ReadLine,
Sleep(Expression),
WriteLine(Expression),
}
impl AbstractNode for BuiltInFunctionCall {
fn expected_type(&self, context: &Context) -> Result<Type, crate::error::ValidationError> {
todo!()
}
fn validate(&self, context: &Context) -> Result<(), crate::error::ValidationError> {
todo!()
}
fn run(self, context: &Context) -> Result<Action, RuntimeError> {
todo!()
}
}