Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/fortran/highlights.scm')
| -rw-r--r-- | runtime/queries/fortran/highlights.scm | 273 |
1 files changed, 115 insertions, 158 deletions
diff --git a/runtime/queries/fortran/highlights.scm b/runtime/queries/fortran/highlights.scm index 4b3c9b96..90f4ecd0 100644 --- a/runtime/queries/fortran/highlights.scm +++ b/runtime/queries/fortran/highlights.scm @@ -1,167 +1,132 @@ -(identifier) @variable -(string_literal) @string -(number_literal) @constant.numeric -(boolean_literal) @constant.builtin.boolean -(comment) @comment - [ - (intrinsic_type) - "allocatable" - "attributes" - "device" - "dimension" - "endtype" - "global" - "grid_global" - "host" - "import" - "in" - "inout" - "intent" - "optional" - "out" - "pointer" - "type" - "value" - ] @keyword.storage.modifier + (intrinsic_type) + "dimension" + "intent" + "in" + "out" + "inout" + "type" + "endtype" + "attributes" + "global" + "device" + "host" + "grid_global" + "pointer" +] @keyword.storage.modifier [ - "contains" - "private" - "public" - ] @keyword.directive + "contains" + "public" + "private" +] @keyword.directive [ - (none) - "implicit" - ] @attribute +"implicit" +(none) +] @attribute [ - "endfunction" - "endprogram" - "endsubroutine" - "function" - "procedure" - "subroutine" - ] @keyword.function + "function" + "endfunction" + "endprogram" + "subroutine" + "endsubroutine" +] @keyword.storage [ - (default) - (procedure_qualifier) - "abstract" - "bind" - "call" - "class" - "continue" - "cycle" - "end" - "endenum" - "endinterface" - "endmodule" - "endprocedure" - "endprogram" - "endsubmodule" - "enum" - "enumerator" - "equivalence" - "exit" - "extends" - "format" - "goto" - "include" - "interface" - "intrinsic" - "non_intrinsic" - "module" - "namelist" - "only" - "parameter" - "print" - "procedure" - "program" - "read" - "stop" - "submodule" - "use" - "write" - ] @keyword - -"return" @keyword.control.return + "module" + "endmodule" + "bind" + "call" + "class" + "continue" + "cycle" + "enumerator" + "equivalence" + "exit" + "format" + "goto" + "include" + "interface" + "endinterface" + "only" + "parameter" + "procedure" + "print" + "program" + "endprogram" + "read" + "return" + "result" + "stop" + "use" + "write" + "enum" + "endenum" + (default) + (procedure_qualifier) +] @keyword [ - "else" - "elseif" - "elsewhere" - "endif" - "endwhere" - "if" - "then" - "where" - ] @keyword.control.conditional + "if" + "then" + "else" + "elseif" + "endif" + "where" + "endwhere" +] @keyword.control.conditional [ - "do" - "enddo" - "forall" - "while" - ] @keyword.control.repeat + "do" + "enddo" + "while" + "forall" +] @keyword.control.repeat [ - "*" - "+" - "-" - "/" - "=" - "<" - ">" - "<=" - ">=" - "==" - "/=" - ] @operator + "*" + "**" + "+" + "-" + "/" + "=" + "<" + ">" + "<=" + ">=" + "==" + "/=" +] @operator [ - "\\.and\\." - "\\.or\\." - "\\.lt\\." - "\\.gt\\." - "\\.ge\\." - "\\.le\\." - "\\.eq\\." - "\\.eqv\\." - "\\.neqv\\." - ] @keyword.operator - -;; Brackets -[ - "(" - ")" - "[" - "]" - "<<<" - ">>>" + "\\.and\\." + "\\.or\\." + "\\.lt\\." + "\\.gt\\." + "\\.ge\\." + "\\.le\\." + "\\.eq\\." + "\\.eqv\\." + "\\.neqv\\." +] @keyword.operator + + ;; Brackets + [ + "(" + ")" + "[" + "]" ] @punctuation.bracket -;; Delimiter -[ - "::" - "," - "%" + ;; Delimiter + [ + "::" + "," + "%" ] @punctuation.delimiter -[ - "defined" - "#define" - "#elif" - "#else" - "#endif" - "#if" - "#ifdef" - "#ifndef" - "#include" - (preproc_directive) -] @keyword.directive - (parameters (identifier) @variable.parameter) @@ -171,38 +136,26 @@ (module_statement (name) @namespace) -(submodule_statement - (module_name) (name) @namespace) - (function_statement (name) @function) (subroutine_statement (name) @function) -(module_procedure_statement - (name) @function) - (end_program_statement (name) @namespace) (end_module_statement (name) @namespace) -(end_submodule_statement - (name) @namespace) - (end_function_statement (name) @function) (end_subroutine_statement (name) @function) -(end_module_procedure_statement - (name) @function) - (subroutine_call - (identifier) @function) + (name) @function) (keyword_argument name: (identifier) @keyword) @@ -210,5 +163,9 @@ (derived_type_member_expression (type_member) @variable.other.member) -(call_expression - (identifier) @function) +(identifier) @variable +(string_literal) @string +(number_literal) @constant.numeric +(boolean_literal) @constant.builtin.boolean +(comment) @comment + |