blark.transform.UnionTypeDeclaration
- class blark.transform.UnionTypeDeclaration(name: Token, extends: Extends | None, declarations: List[UnionElementDeclaration], meta: Meta | None = None)[source]
Bases:
object
A full declaration of a UNION type, as part of a TYPE/END_TYPE block.
Examples:
UNION iVal : INT; aAsBytes : ARRAY [0..2] OF BYTE; END_UNION UNION iValue : INT; eValue : (iValue := 1, iValue2 := 2) INT; END_UNION
Lark grammar
This class is used by the following grammar rules:
union_type_declaration
union_type_declaration: structure_type_name_declaration [ extends ] ":" _UNION ( union_element_declaration ";"+ )* _END_UNION ";"*
Methods
__init__
(name, extends, declarations[, meta])from_lark
(name, extends, *decls)Attributes
- declarations: List[UnionElementDeclaration]