basis for type-checked builtins (1)

This commit is contained in:
Mark 2023-03-14 12:40:15 +01:00 committed by GitHub
parent 3ac886115a
commit 5d868a759d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,10 @@ impl BuiltinFunction {
_ => return None, _ => return None,
}) })
} }
pub fn returns(&self) -> VType { pub fn takes(&self, in: Vec<VType>) -> bool {
todo!()
}
pub fn returns(&self, in: Vec<VType>) -> VType {
match self { match self {
// [] // []
Self::Print | Self::Println | Self::Debug | Self::Sleep => VType { Self::Print | Self::Println | Self::Debug | Self::Sleep => VType {