diff --git a/Cargo.toml b/Cargo.toml index 08fabcf..335ac8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "tree-sitter-YOUR-LANGUAGE-NAME" -description = "YOUR-LANGUAGE-NAME grammar for the tree-sitter parsing library" +name = "tree-sitter-lang" +description = "lang grammar for the tree-sitter parsing library" version = "0.0.1" -keywords = ["incremental", "parsing", "YOUR-LANGUAGE-NAME"] +keywords = ["incremental", "parsing", "lang"] categories = ["parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter-YOUR-LANGUAGE-NAME" -edition = "2018" +repository = "https://codeberg.org/programsnail/tree-sitter-lang" +edition = "2023" license = "MIT" build = "bindings/rust/build.rs" diff --git a/binding.gyp b/binding.gyp index 7079205..5196e54 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "tree_sitter_YOUR_LANGUAGE_NAME_binding", + "target_name": "tree_sitter_lang_binding", "include_dirs": [ "" + "const" + "--" + "out" + "->" +] @keyword.storage.modifier + +[ + "for" + "@" +] @keyword.control.repeat + +[ + "if" + "??" + "elif" + "!!" + "else" + "!!=>" +] @keyword.control.conditional + +[ + "break" + "continue" + "return" + "bring" +] @keyword.control.return + +[ + "do" + "=>" + ":=" + "=:" +] @keyword.control + +[ + "import" + "::" +] @keyword.control.import + +[ + "->" + "<-" + "=" + "|" + "&" + ":" + "!" + "?" +] @punctuation + +[ + ";" +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +(definition_info) @comment.block.documentation +(annotation_info) @comment.block.documentation + +(extra) @comment.block + +(placeholder) @variable.language +(simple_name_identifier) @variable +(simple_type_identifier) @type +(typeclass_identifier) @tag ; for better highlighting +(argument_name_identifier) @variable.parameter +(argument_type_identifier) @type.builtin ; for better highlighting +(annotation_identifier) @attribute + +"\\" @type ; for better highlighting + +(operator) @keyword.operator +(operator_tail1) @keyword.operator +(operator_tail2) @keyword.operator +(operator_tail3) @keyword.operator + +(float_literal) @constant.numeric.float +(double_literal) @constant.numeric.float +(int_literal) @constant.numeric.integer +(long_literal) @constant.numeric.integer +(index_literal) @constant.numeric.integer +(string_literal) @string +(unicode_string_literal) @string +(char_literal) @constant.char +(unicode_literal) @constant.char +(bool_literal) @constant.language +(unit_literal) @constant.language +(null_literal) @constant.language