From 5871bf68de0a46e2742509b1d8fe689d663e007f Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 13 Sep 2017 23:37:49 -0700 Subject: [PATCH] test for function parsing --- src/schala_lang/parsing.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/schala_lang/parsing.rs b/src/schala_lang/parsing.rs index 2e55c30..d81e9e1 100644 --- a/src/schala_lang/parsing.rs +++ b/src/schala_lang/parsing.rs @@ -717,6 +717,11 @@ mod parse_tests { parse_test!("a + b", AST(vec![Expression(binexp!(op!("+"), var!("a"), var!("b")))])); } + #[test] + fn parsing_functions() { + parse_test!("fn oi()", AST(vec![Declaration(FuncDecl { name: rc!(oi), params: vec![] })])); + } + #[test] fn parsing_types() { parse_test!("type Yolo = Yolo", AST(vec![Declaration(TypeDecl(rc!(Yolo), TypeBody(vec![Variant::Singleton(rc!(Yolo))])))]));