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

location_type

If located, one of {'input', 'output', 'memory"}.

qualified_name

Qualified name including parent.

name

item

parent

location

block

base_type

type

value

comments

pragmas

filename

meta

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
property qualified_name: str

Qualified name including parent. For example, fbName.DeclName.

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