blark.summary.DeclarationSummary
- class blark.summary.DeclarationSummary(comments: List[str], pragmas: List[str], filename: pathlib.Path | None, meta: tf.Meta | None, name: str, item: tf.Declaration | tf.GlobalVariableDeclaration | tf.VariableInitDeclaration | tf.StructureElementDeclaration | tf.UnionElementDeclaration | tf.ExternalVariableDeclaration | tf.InitDeclaration, parent: str | None, location: str | None, block: str, base_type: str, type: str, value: str | None)[source]
Bases:
Summary
Summary representation of a single declaration.
Methods
__init__
(comments, pragmas, filename, meta, ...)from_block
(block, parent[, filename])from_declaration
(item[, parent, ...])from_global_variable
(item[, parent, ...])Attributes
If located, one of {'input', 'output', 'memory"}.
Qualified name including parent.
comments
pragmas
filename
meta
- item: tf.Declaration | tf.GlobalVariableDeclaration | tf.VariableInitDeclaration | tf.StructureElementDeclaration | tf.UnionElementDeclaration | tf.ExternalVariableDeclaration | tf.InitDeclaration
- property location_type: Literal['input', 'output', 'memory'] | None
If located, one of {‘input’, ‘output’, ‘memory”}.
- classmethod from_declaration(item: InitDeclaration | StructureElementDeclaration | UnionElementDeclaration, parent: Function | Method | FunctionBlock | StructureTypeDeclaration | None = None, block_header: str = 'unknown', filename: Path | None = None) Dict[str, DeclarationSummary] [source]
- classmethod from_global_variable(item: GlobalVariableDeclaration, parent: GlobalVariableDeclarations | None = None, block_header: str = 'VAR_GLOBAL', filename: Path | None = None) Dict[str, DeclarationSummary] [source]
- classmethod from_block(block: VariableDeclarationBlock, parent: Function | Method | FunctionBlock, filename: Path | None = None) Dict[str, DeclarationSummary] [source]
- __init__(comments: List[str], pragmas: List[str], filename: pathlib.Path | None, meta: tf.Meta | None, name: str, item: tf.Declaration | tf.GlobalVariableDeclaration | tf.VariableInitDeclaration | tf.StructureElementDeclaration | tf.UnionElementDeclaration | tf.ExternalVariableDeclaration | tf.InitDeclaration, parent: str | None, location: str | None, block: str, base_type: str, type: str, value: str | None) None