rust: Extract runtime language detection into separate crate
This patch adds a new `tree-sitter-loader` crate, which holds the CLI's logic for finding and building local grammar definitions at runtime. This allows other command-line tools to use this logic too!
This commit is contained in:
parent
162ce789bc
commit
66c30648c2
14 changed files with 117 additions and 62 deletions
|
|
@ -1,4 +1,3 @@
|
|||
use crate::loader::Loader;
|
||||
use crate::query_testing::{parse_position_comments, Assertion};
|
||||
use ansi_term::Colour;
|
||||
use anyhow::{anyhow, Result};
|
||||
|
|
@ -6,6 +5,7 @@ use std::fs;
|
|||
use std::path::Path;
|
||||
use tree_sitter::Point;
|
||||
use tree_sitter_highlight::{Highlight, HighlightConfiguration, HighlightEvent, Highlighter};
|
||||
use tree_sitter_loader::Loader;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Failure {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue