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 /queries/fortran | |
| 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
Diffstat (limited to 'queries/fortran')
| -rw-r--r-- | queries/fortran/folds.scm | 11 | ||||
| -rw-r--r-- | queries/fortran/highlights.scm | 92 |
2 files changed, 103 insertions, 0 deletions
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 |
