fab.parse.c module¶
C language handling classes.
- class fab.parse.c.AnalysedC(fpath, file_hash=None, symbol_defs=None, symbol_deps=None, file_deps=None)¶
Bases:
AnalysedDependentAn analysis result for a single C file, containing symbol definitions and dependencies.
- Note: We don’t need to worry about compile order with pure C projects; we can compile all in one go.
However, with a Fortran -> C -> Fortran dependency chain, we do need to ensure that one Fortran file is compiled before another, so this class must be part of the dependency tree analysis.
- Parameters:
fpath (
Union[str,Path]) – The source file that was analysed.file_hash (
Optional[int]) – (default:None) The hash of the source. If omitted, Fab will evaluate lazily.symbol_defs (
Optional[Iterable[str]]) – (default:None) Set of symbol names defined by this source file.symbol_deps (
Optional[Iterable[str]]) – (default:None) Set of symbol names used by this source file. Can include symbols in the same file.file_deps (
Optional[Iterable[Path]]) – (default:None) Other files on which this source depends. Must not include itself. This attribute is calculated during symbol analysis, after everything has been parsed.