blark.transform.VariableDeclarations
- class blark.transform.VariableDeclarations(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None)[source]
Bases:
VariableDeclarationBlock
Variable declarations block (
VAR
).May be annotated with attributes (see
VariableAttributes
).Lark grammar
This class is used by the following grammar rules:
var_declarations
var_declarations: "VAR"i [ variable_attributes ] var_body "END_VAR"i ";"*
Methods
__init__
(attrs, items[, meta])from_lark
(attrs, tree)Attributes
attribute_pragmas
Attribute pragmas associated with the variable declaration block.
- attrs: VariableAttributes | None
- items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration]
- static from_lark(attrs: VariableAttributes | None, tree: Tree) VariableDeclarations [source]
- __init__(attrs: VariableAttributes | None, items: List[ArrayVariableInitDeclaration | StringVariableInitDeclaration | VariableOneInitDeclaration | FunctionBlockDeclaration | EdgeDeclaration | StructuredVariableInitDeclaration], meta: Meta | None = None) None