From b709cfd51a4d8b20a06d3ae13335ee9088c9a1b4 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 23 Feb 2019 02:50:11 -0800 Subject: [PATCH] Start adding call --- schala-lang/language/src/typechecking.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/schala-lang/language/src/typechecking.rs b/schala-lang/language/src/typechecking.rs index 9c9d8f3..2ce70f2 100644 --- a/schala-lang/language/src/typechecking.rs +++ b/schala-lang/language/src/typechecking.rs @@ -274,6 +274,7 @@ impl<'a> TypeContext<'a> { BinExp(op, lhs, rhs) => self.binexp(op, lhs.node(), rhs.node())?, IfExpression { discriminator, body } => self.if_expr(discriminator, body)?, Value(val) => self.handle_value(val)?, + Call { box ref f, arguments } => self.call(f.node(), arguments)?, Lambda { params, type_anno, body } => self.lambda(params, type_anno, body)?, _ => ty!(Unit), }) @@ -346,6 +347,11 @@ impl<'a> TypeContext<'a> { Ok(ty!(UserDefined)) } + fn call(&mut self, f: &Expression, args: &Vec>) -> InferResult { + + Ok(ty!(UserDefined)) + } + fn block(&mut self, block: &Block) -> InferResult { let mut output = ty!(Unit); for s in block.iter() {