Skip to main content

Module fortran

Module fortran 

Source

Constants§

CALL_QUERY
Tree-sitter query for extracting Fortran function calls. Includes direct calls and derived type member calls (obj%method).
ELEMENT_QUERY
Tree-sitter query for extracting Fortran elements (modules, functions, subroutines).
IMPORT_QUERY
Tree-sitter query for extracting Fortran imports (USE statements).
REFERENCE_QUERY
Tree-sitter query for extracting Fortran type references.

Functions§

extract_function_name
Extract the name of a function or subroutine node. Both subroutine_statement and function_statement expose a named field called name. Return the identifier text if present.
extract_inheritance
Extract inheritance information from a Fortran node. Fortran does not have classical inheritance; return empty.
find_method_for_receiver
Find the method name for a subroutine/function defined inside a module. Returns the function/subroutine identifier if the node is enclosed by a module.
find_receiver_type
Find the enclosing module name for a given subroutine/function node. Walk up the parent chain until a module node is found and return its name.