diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-04-17 20:42:17 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-04-23 16:03:18 +0200 |
| commit | 9820c8ca7d24500f14d30332bd4f083c0abbc579 (patch) | |
| tree | fd590d8a1649c47833ca894bfeaf73085f7243d4 | |
| parent | parsers: Add Fortran parser (diff) | |
| download | nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.tar nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.tar.gz nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.tar.bz2 nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.tar.lz nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.tar.xz nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.tar.zst nvim-treesitter-9820c8ca7d24500f14d30332bd4f083c0abbc579.zip | |
Add Fortran queries from @oponkork
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | queries/fortran/folds.scm | 11 | ||||
| -rw-r--r-- | queries/fortran/highlights.scm | 92 |
3 files changed, 105 insertions, 1 deletions
@@ -147,7 +147,8 @@ We are looking for maintainers to add more parsers and to write query files for - [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm) - [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera) - [x] [fennel](https://github.com/travonted/tree-sitter-fennel) (maintained by @TravonteD) -- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by @Shatur95) +- [ ] [fortran](https://github.com/stadelmanma/tree-sitter-fortran) +- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by not @tjdevries) - [x] [Glimmer and Ember](https://github.com/alexlafroscia/tree-sitter-glimmer) (maintained by @alexlafroscia) - [x] [go](https://github.com/tree-sitter/tree-sitter-go) (maintained by @theHamsta, @WinWisely268) - [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley) diff --git a/queries/fortran/folds.scm b/queries/fortran/folds.scm new file mode 100644 index 000000000..a2edc64d3 --- /dev/null +++ b/queries/fortran/folds.scm @@ -0,0 +1,11 @@ +;; by @oponkork +[ + (if_statement) + (where_statement) + (enum_statement) + (do_loop_statement) + (derived_type_definition) + (function) + (subroutine) + (interface) +] @fold diff --git a/queries/fortran/highlights.scm b/queries/fortran/highlights.scm new file mode 100644 index 000000000..e31981efa --- /dev/null +++ b/queries/fortran/highlights.scm @@ -0,0 +1,92 @@ +;; by @oponkork + +(identifier) @variable +(string_literal) @string +(number_literal) @number +(boolean_literal) @boolean +(comment) @comment + +[ + (intrinsic_type) + ; (primitive_type_qualifier) + "dimension" + "intent" + "in" + "out" + "inout" + "type" + "endtype" + "attributes" + "global" + "device" + "host" + "grid_global" +] @type + +[ + "bind" + "call" + "contains" + "continue" + "cycle" + "endfunction" + "endmodule" + "endprogram" + "endsubroutine" + "enumerator" + "equivalence" + "exit" + "format" + "function" + "goto" + "include" + "interface" + "module" + "parameter" + "print" + "program" + "read" + "return" + "stop" + "subroutine" + "use" + "write" + "implicit" + (none) + (default) + (procedure_qualifier) + (private_statement) + (public_statement) +] @keyword + +[ + "if" + "then" + "else" + "elseif" + "endif" +] @conditional + +[ + "do" + "enddo" + "while" + "forall" +] @repeat + +[ + "<" + ">" + "<=" + ">=" + "==" + "/=" +] @keyword.operator + +; ;; Brackets +; [ +; "(" +; ")" +; "[" +; "]" +; ] @punctuation.bracket |
