From 10fa9f498268fbbf292371d5597358d5be8866c5 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Fri, 15 Apr 2022 09:35:31 -0700 Subject: [PATCH] Split programming languages and structured text parser tables --- manual/src/upstream_parsers.md | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/manual/src/upstream_parsers.md b/manual/src/upstream_parsers.md index 3f777ca11..e53afc43a 100644 --- a/manual/src/upstream_parsers.md +++ b/manual/src/upstream_parsers.md @@ -1,8 +1,8 @@ # Upstream Parsers -Difftastic uses the following tree-sitter parsers: +Difftastic supports the following programming languages. -| Language | Git Repository | +| Language | Parser Used | |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| | Bash | [tree-sitter/tree-sitter-bash](https://github.com/tree-sitter/tree-sitter-bash) | | C | [tree-sitter/tree-sitter-c](https://github.com/tree-sitter/tree-sitter-c) | @@ -10,7 +10,6 @@ Difftastic uses the following tree-sitter parsers: | C# | [tree-sitter/tree-sitter-c-sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) | | Clojure | [sogaiu/tree-sitter-clojure](https://github.com/sogaiu/tree-sitter-clojure) ([branched](https://github.com/sogaiu/tree-sitter-clojure/tree/issue-21)) | | Common Lisp | [theHamsta/tree-sitter-commonlisp](https://github.com/theHamsta/tree-sitter-commonlisp) | -| CSS | [tree-sitter/tree-sitter-css](https://github.com/tree-sitter/tree-sitter-css) | | Dart | [UserNobody14/tree-sitter-dart](https://github.com/UserNobody14/tree-sitter-dart) | | Elixir | [elixir-lang/tree-sitter-elixir](https://github.com/elixir-lang/tree-sitter-elixir) | | Emacs Lisp | [wilfred/tree-sitter-elisp](https://github.com/Wilfred/tree-sitter-elisp) | @@ -20,7 +19,6 @@ Difftastic uses the following tree-sitter parsers: | Janet | [sogaiu/tree-sitter-janet-simple](https://github.com/sogaiu/tree-sitter-janet-simple) | | Java | [tree-sitter/tree-sitter-java](https://github.com/tree-sitter/tree-sitter-java) | | JavaScript, JSX | [tree-sitter/tree-sitter-javascript](https://github.com/tree-sitter/tree-sitter-javascript) | -| JSON | [tree-sitter/tree-sitter-json](https://github.com/tree-sitter/tree-sitter-json) | | Kotlin | [fwcd/tree-sitter-kotlin](https://github.com/fwcd/tree-sitter-kotlin) | | Lua | [nvim-treesitter/tree-sitter-lua](https://github.com/nvim-treesitter/tree-sitter-lua) | | Nix | [cstrahan/tree-sitter-nix](https://github.com/cstrahan/tree-sitter-nix) | @@ -30,24 +28,15 @@ Difftastic uses the following tree-sitter parsers: | Ruby | [tree-sitter/tree-sitter-ruby](https://github.com/tree-sitter/tree-sitter-ruby) | | Rust | [tree-sitter/tree-sitter-rust](https://github.com/tree-sitter/tree-sitter-rust) ([forked](https://github.com/Wilfred/tree-sitter-rust)) | | Scala | [tree-sitter/tree-sitter-scala](https://github.com/tree-sitter/tree-sitter-scala) | -| TOML | [ikatyang/tree-sitter-toml](https://github.com/ikatyang/tree-sitter-toml) | | TypeScript, TSX | [tree-sitter/tree-sitter-typescript](https://github.com/tree-sitter/tree-sitter-typescript) | -| YAML | [ikatyang/tree-sitter-yaml](https://github.com/ikatyang/tree-sitter-yaml) | | Zig | [maxxnino/tree-sitter-zig](https://github.com/maxxnino/tree-sitter-zig) | +It also supports the following structured text formats. -## Updating a parser +| Language | Parser Used | +|----------|---------------------------------------------------------------------------------| +| CSS | [tree-sitter/tree-sitter-css](https://github.com/tree-sitter/tree-sitter-css) | +| JSON | [tree-sitter/tree-sitter-json](https://github.com/tree-sitter/tree-sitter-json) | +| TOML | [ikatyang/tree-sitter-toml](https://github.com/ikatyang/tree-sitter-toml) | +| YAML | [ikatyang/tree-sitter-yaml](https://github.com/ikatyang/tree-sitter-yaml) | -To update a parser, pull commits from the upstream git repository. For -example, the following command will update the Java parser: - -``` -$ git subtree pull --prefix=vendor/tree-sitter-java git@github.com:tree-sitter/tree-sitter-java.git master -``` - -To see when each parser was last updated, use the following shell -command: - -``` -$ for d in $(git log | grep git-subtree-dir | tr -d ' ' | cut -d ":" -f2 | sort); do echo "$d"; git log --pretty=" %cs" -n 1 $d; done -```