From 448c68e028cb4b948fd77472f0571d3cf329fb38 Mon Sep 17 00:00:00 2001 From: James Harton Date: Tue, 26 Feb 2019 13:10:18 +1300 Subject: [PATCH] :( --- huia-compiler/src/parse_consumer.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/huia-compiler/src/parse_consumer.rs b/huia-compiler/src/parse_consumer.rs index df67074..cf082a6 100644 --- a/huia-compiler/src/parse_consumer.rs +++ b/huia-compiler/src/parse_consumer.rs @@ -10,6 +10,21 @@ pub fn consume(mut context: &mut Context, term: &Term) { println!("args = {:?}", args); println!("body = {:?}", body); println!("reqs = {:?}", reqs); + + match deftype.value_ref().as_str() { + "type" => { + let class = context + .ensure_class(context.ident(defname.typename().unwrap().value_ref())); + } + "trait" => { + let tr = context + .ensure_trait(context.ident(defname.typename().unwrap().value_ref())); + } + "def" => {} + "defp" => {} + "defs" => {} + _ => (), + } } _ => panic!("Unexpected term {:?}", term), }