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:
parent
e26cbb62a5
commit
4cac85fec4
25 changed files with 244 additions and 92 deletions
|
|
@ -5,6 +5,7 @@ use super::helpers::scope_sequence::ScopeSequence;
|
|||
use crate::generate;
|
||||
use crate::test::{parse_tests, print_diff, print_diff_key, TestEntry};
|
||||
use crate::util;
|
||||
use lazy_static::lazy_static;
|
||||
use std::{env, fs, time, usize};
|
||||
use tree_sitter::{InputEdit, LogType, Node, Parser, Point, Tree};
|
||||
|
||||
|
|
@ -373,7 +374,10 @@ fn check_consistent_sizes(tree: &Tree, input: &Vec<u8>) {
|
|||
|
||||
assert!(start_byte <= end_byte);
|
||||
assert!(start_point <= end_point);
|
||||
assert_eq!(start_byte, line_offsets[start_point.row] + start_point.column);
|
||||
assert_eq!(
|
||||
start_byte,
|
||||
line_offsets[start_point.row] + start_point.column
|
||||
);
|
||||
assert_eq!(end_byte, line_offsets[end_point.row] + end_point.column);
|
||||
|
||||
let mut last_child_end_byte = start_byte;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue