mate_query.cpg.models.node.translation_unit module

Nodes corresponding to translation units in the compilation process.

At runtime, the models here are accessed via attributes on a CPG, not directly.

class mate_query.cpg.models.node.translation_unit.TranslationUnit(uuid: str, kind: NodeKind, attributes: Dict[str, Any] = {})

Bases: mate_query.cpg.models.node._typechecking.NodeMixin

A translation unit in the compiled program

Parameters
  • uuid (str) –

  • kind (NodeKind) –

  • attributes (Dict[str, Any]) –

filename

The input/source filename for this translation unit

Return type

str

flags

The command line arguments that produced this translation unit

Return type

str

producer

An identifier for the compiler or tool that produced this translation unit

Return type

str

source_language

The source language for this translation unit, as a DW_LANG_ constant

Return type

str