Skip to main content

ELEMENT_QUERY

Constant ELEMENT_QUERY 

Source
pub const ELEMENT_QUERY: &str = r"
(subroutine
  (subroutine_statement) @function)

(function
  (function_statement) @function)
";
Expand description

Tree-sitter query for extracting Fortran elements (functions and subroutines).

Module constructs are omitted: module_statement has no name field in tree-sitter-fortran 0.5.1, so @class captures would be counted in analyze_directory but produce no names in analyze_file. Modules will be added here once the grammar exposes a name field.