fab.parse.fortran_common#
Common functionality for both Fortran and (sanitised) X90 processing.
Classes
|
Base class for Fortran parse-tree analysers, e.g FortranAnalyser and X90Analyser. |
- class fab.parse.fortran_common.FortranAnalyserBase(config, result_class, std=None)#
Base class for Fortran parse-tree analysers, e.g FortranAnalyser and X90Analyser.
- Parameters:
config (
BuildConfig
) – The BuildConfig object.result_class – The type (class) of the analysis result. Defined by the subclass.
- property config: BuildConfig#
Returns the BuildConfig to use.
- run(fpath)#
Parse the source file and record what we’re interested in (subclass specific).
Reloads previous analysis results if available.
Returns the analysis data and the result file where it was stored/loaded.
- Return type:
Union
[Tuple
[AnalysedDependent
,Path
],Tuple
[EmptySourceFile
,None
],Tuple
[Exception
,None
]]
- abstract walk_nodes(fpath, file_hash, node_tree)#
Examine the nodes in the parse tree, recording things we’re interested in.
Return type depends on our subclass, and will be a subclass of AnalysedDependent.
- Return type: