From: Ruben Beltran del Rio Date: Wed, 4 Oct 2023 13:22:05 +0000 (+0200) Subject: Simplify dir X-Git-Url: https://git.r.bdr.sh/rbdr/tree-sitter-api-notation/commitdiff_plain/20fe4b1e1cee75463cd63cfe202e05e0b61d941a?hp=5d5dd65cee63b8805a186d28660ed65072b3b88a Simplify dir --- diff --git a/Cargo.toml b/Cargo.toml index 3ed407b..46c2966 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "tree-sitter-api-notation" description = "api-notation grammar for the tree-sitter parsing library" -version = "1.0.0" +version = "0.0.1" keywords = ["incremental", "parsing", "api-notation"] categories = ["parsing", "text-editors"] repository = "https://github.com/tree-sitter/tree-sitter-api-notation" edition = "2018" -license = "Apache-2.0" +license = "MIT" build = "bindings/rust/build.rs" include = [ diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 7bc923a..0bbddda 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,4 +1,4 @@ -//! This crate provides api-notation language support for the [tree-sitter][] parsing library. +//! This crate provides api_notation language support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [language][language func] function to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: @@ -6,7 +6,7 @@ //! ``` //! let code = ""; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_api_notation::language()).expect("Error loading api-notation grammar"); +//! parser.set_language(tree_sitter_api_notation::language()).expect("Error loading api_notation grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //! @@ -47,6 +47,6 @@ mod tests { let mut parser = tree_sitter::Parser::new(); parser .set_language(super::language()) - .expect("Error loading api-notation language"); + .expect("Error loading api_notation language"); } } diff --git a/example.api b/example.api new file mode 100644 index 0000000..37e08d8 --- /dev/null +++ b/example.api @@ -0,0 +1,19 @@ +Forum.Models.Post + +glyphs > + -id + -created_at + -parent_id + -text + -author + // Comments are also + // Allowed in the middle + ~>textUpdated(text ) + ->authorUpdated(author ) + <~textWillUpdate(text ) + <-postWillRender(post ) + +>authorUpdated(author ) + <+textWillUpdate(text ) + ::getAll(parent_id ) => Promise> #> NotFoundError,DisplayError + ::get(id ) => Promise + #update(text ) => Promise + #transform([transformer] (T) => boolean>) diff --git a/package.json b/package.json index de62554..5169fca 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "tree-sitter-cli": "^0.20.8" }, "scripts": { - "build": "tree-sitter generate && node-gyp build", + "build": "tree-sitter generate", "parse": "tree-sitter parse", "test": "tree-sitter test" },