Adding some code but likely need to create a build script
This commit is contained in:
parent
5c11808e7d
commit
5ba313c568
@ -1,7 +1,9 @@
|
|||||||
mod app;
|
mod app;
|
||||||
mod ui;
|
mod ui;
|
||||||
mod input;
|
mod input;
|
||||||
|
mod treesitter;
|
||||||
|
|
||||||
pub use app::*;
|
pub use app::*;
|
||||||
pub use ui::draw;
|
pub use ui::draw;
|
||||||
pub use input::handle_input;
|
pub use input::handle_input;
|
||||||
|
pub use treesitter::compile_md_grammar;
|
||||||
|
13
src/treesitter.rs
Normal file
13
src/treesitter.rs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
use tree_sitter::{Parser, Language};
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
pub fn compile_md_grammar() {
|
||||||
|
let dir: PathBuf = ["tree-sitter-javascript", "src"].iter().collect();
|
||||||
|
|
||||||
|
cc::Build::new()
|
||||||
|
.include(&dir)
|
||||||
|
.file(dir.join("parser.c"))
|
||||||
|
.file(dir.join("scanner.c"))
|
||||||
|
.compile("tree-sitter-javascript")
|
||||||
|
}
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
use tree_sitter::{Parser, Language};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user