Add derivative crate

This commit is contained in:
greg 2019-09-18 01:58:38 -07:00
parent 8b6de6961f
commit 73519d5be5
3 changed files with 5 additions and 1 deletions

View File

@ -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" }

View File

@ -16,6 +16,7 @@ extern crate schala_repl;
#[macro_use]
extern crate schala_lang_codegen;
extern crate ena;
extern crate derivative;
macro_rules! bx {

View File

@ -20,7 +20,9 @@ fn parse(input: &str) -> ParseResult<AST> {
}
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] }) }