Add benchmark script

* Structure `cli` crate as both a library and an executable, so that
benchmarks can import code from the crate.
* Import macros in the Rust 2018 style.
This commit is contained in:
Max Brunsfeld 2019-02-01 14:39:37 -08:00
parent e26cbb62a5
commit 4cac85fec4
25 changed files with 244 additions and 92 deletions

View file

@ -1,31 +1,10 @@
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
extern crate hashbrown;
extern crate regex;
extern crate rsass;
extern crate serde_json;
mod error;
mod generate;
mod loader;
mod logger;
mod parse;
mod test;
mod util;
#[cfg(test)]
mod tests;
use self::loader::Loader;
use clap::{App, AppSettings, Arg, SubCommand};
use std::env;
use std::fs;
use std::path::Path;
use std::process::exit;
use tree_sitter_cli::loader::Loader;
use tree_sitter_cli::{error, generate, logger, parse, test};
use std::usize;
fn main() {