fpm_source_parsing Module

Parsing of package source files

This module exposes two functions, parse_f_source and parse_c_source, which perform a rudimentary parsing of fortran and c source files in order to extract information required for module dependency tracking.

Both functions additionally calculate and store a file digest (hash) which is used by the backend (fpm_backend) to skip compilation of unmodified sources.

Both functions return an instance of the srcfile_t type.

For more information, please read the documentation for each function:



Contents


Functions

public function parse_c_source(c_filename, error) result(c_source)

Parsing of c source files

Read more…

Arguments

Type IntentOptional AttributesName
character, intent(in) :: c_filename
type(error_t), intent(out), allocatable:: error

Return Value type(srcfile_t)

public function parse_f_source(f_filename, error) result(f_source)

Parsing of free-form fortran source files

Read more…

Arguments

Type IntentOptional AttributesName
character, intent(in) :: f_filename
type(error_t), intent(out), allocatable:: error

Return Value type(srcfile_t)