From 73519d5be546e973d121cf496964a8e9921d7b91 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 18 Sep 2019 01:58:38 -0700 Subject: [PATCH] Add derivative crate --- schala-lang/language/Cargo.toml | 1 + schala-lang/language/src/lib.rs | 1 + schala-lang/language/src/parsing/test.rs | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/schala-lang/language/Cargo.toml b/schala-lang/language/Cargo.toml index cba92f2..7632789 100644 --- a/schala-lang/language/Cargo.toml +++ b/schala-lang/language/Cargo.toml @@ -12,6 +12,7 @@ lazy_static = "1.3.0" failure = "0.1.5" ena = "0.11.0" stopwatch = "0.0.7" +derivative = "1.0.3" schala-lang-codegen = { path = "../codegen" } schala-repl = { path = "../../schala-repl" } diff --git a/schala-lang/language/src/lib.rs b/schala-lang/language/src/lib.rs index 554d99e..af0e29f 100644 --- a/schala-lang/language/src/lib.rs +++ b/schala-lang/language/src/lib.rs @@ -16,6 +16,7 @@ extern crate schala_repl; #[macro_use] extern crate schala_lang_codegen; extern crate ena; +extern crate derivative; macro_rules! bx { diff --git a/schala-lang/language/src/parsing/test.rs b/schala-lang/language/src/parsing/test.rs index 376ce55..06fd114 100644 --- a/schala-lang/language/src/parsing/test.rs +++ b/schala-lang/language/src/parsing/test.rs @@ -20,7 +20,9 @@ fn parse(input: &str) -> ParseResult { } macro_rules! parse_test { - ($string:expr, $correct:expr) => { assert_eq!(parse($string).unwrap(), $correct) }; + ($string:expr, $correct:expr) => { + assert_eq!(parse($string).unwrap(), $correct) + }; } macro_rules! parse_test_wrap_ast { ($string:expr, $correct:expr) => { parse_test!($string, AST { statements: vec![$correct] }) }