Add tree sitter submodule
This commit is contained in:
parent
f30dfe6431
commit
0359fabf1a
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "tree-sitter-dust"]
|
||||||
|
path = tree-sitter-dust
|
||||||
|
url = ssh://git@git.jeffa.io:22022/jeff/tree-sitter-dust.git
|
3894
Cargo.lock
generated
Normal file
3894
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
34
Cargo.toml
Normal file
34
Cargo.toml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[package]
|
||||||
|
name = "dust"
|
||||||
|
description = "Data-Oriented Programming Language"
|
||||||
|
version = "0.2.0"
|
||||||
|
keywords = ["incremental", "parsing", "dust"]
|
||||||
|
categories = ["parsing", "text-editors"]
|
||||||
|
repository = "https://github.com/tree-sitter/tree-sitter-dust"
|
||||||
|
edition = "2018"
|
||||||
|
license = "MIT"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
ansi_term = "0.12.1"
|
||||||
|
chrono = "0.4.31"
|
||||||
|
clap = { version = "4.4.4", features = ["derive"] }
|
||||||
|
comfy-table = "7.0.1"
|
||||||
|
csv = "1.2.2"
|
||||||
|
eframe = "0.22.0"
|
||||||
|
egui = "0.22.0"
|
||||||
|
egui_extras = "0.22.0"
|
||||||
|
git2 = "0.18.1"
|
||||||
|
json = "0.12.4"
|
||||||
|
rand = "0.8.5"
|
||||||
|
rayon = "1.8.0"
|
||||||
|
reqwest = { version = "0.11.20", features = ["blocking", "json"] }
|
||||||
|
rustyline = { version = "12.0.0", features = ["derive", "with-file-history"] }
|
||||||
|
serde = { version = "1.0.188", features = ["derive"] }
|
||||||
|
serde_json = "1.0.107"
|
||||||
|
sysinfo = "0.29.10"
|
||||||
|
toml = "0.8.1"
|
||||||
|
trash = "3.0.6"
|
||||||
|
tree-sitter = "0.20.10"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
cc = "1.0"
|
27
build.rs
27
build.rs
@ -1,5 +1,5 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
let src_dir = std::path::Path::new("src");
|
let src_dir = std::path::Path::new("tree-sitter-dust/src");
|
||||||
|
|
||||||
let mut c_config = cc::Build::new();
|
let mut c_config = cc::Build::new();
|
||||||
c_config.include(&src_dir);
|
c_config.include(&src_dir);
|
||||||
@ -10,31 +10,6 @@ fn main() {
|
|||||||
let parser_path = src_dir.join("parser.c");
|
let parser_path = src_dir.join("parser.c");
|
||||||
c_config.file(&parser_path);
|
c_config.file(&parser_path);
|
||||||
|
|
||||||
// If your language uses an external scanner written in C,
|
|
||||||
// then include this block of code:
|
|
||||||
|
|
||||||
/*
|
|
||||||
let scanner_path = src_dir.join("scanner.c");
|
|
||||||
c_config.file(&scanner_path);
|
|
||||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
|
||||||
*/
|
|
||||||
|
|
||||||
c_config.compile("parser");
|
c_config.compile("parser");
|
||||||
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
|
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
|
||||||
|
|
||||||
// If your language uses an external scanner written in C++,
|
|
||||||
// then include this block of code:
|
|
||||||
|
|
||||||
/*
|
|
||||||
let mut cpp_config = cc::Build::new();
|
|
||||||
cpp_config.cpp(true);
|
|
||||||
cpp_config.include(&src_dir);
|
|
||||||
cpp_config
|
|
||||||
.flag_if_supported("-Wno-unused-parameter")
|
|
||||||
.flag_if_supported("-Wno-unused-but-set-variable");
|
|
||||||
let scanner_path = src_dir.join("scanner.cc");
|
|
||||||
cpp_config.file(&scanner_path);
|
|
||||||
cpp_config.compile("scanner");
|
|
||||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ pub fn language() -> Language {
|
|||||||
/// The content of the [`node-types.json`][] file for this grammar.
|
/// The content of the [`node-types.json`][] file for this grammar.
|
||||||
///
|
///
|
||||||
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
|
/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types
|
||||||
pub const NODE_TYPES: &'static str = include_str!("../../../src/node-types.json");
|
pub const NODE_TYPES: &'static str = include_str!("../tree-sitter-dust/src/node-types.json");
|
||||||
|
|
||||||
// Uncomment these to include any queries that this grammar contains
|
// Uncomment these to include any queries that this grammar contains
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ use rustyline::{
|
|||||||
|
|
||||||
use std::{borrow::Cow, fs::read_to_string};
|
use std::{borrow::Cow, fs::read_to_string};
|
||||||
|
|
||||||
use dust_lib::{eval, eval_with_context, Value, VariableMap};
|
use dust::{eval, eval_with_context, Value, VariableMap};
|
||||||
|
|
||||||
/// Command-line arguments to be parsed.
|
/// Command-line arguments to be parsed.
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
|
1
tree-sitter-dust
Submodule
1
tree-sitter-dust
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 916b59b4b6ff3a9ece271a292932202200df04b8
|
Loading…
Reference in New Issue
Block a user