:py:mod:`raesl.compile.typechecking.compdef_transform_builder` ============================================================== .. py:module:: raesl.compile.typechecking.compdef_transform_builder .. autoapi-nested-parse:: Code for collecting and type checking of transformations. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: raesl.compile.typechecking.compdef_transform_builder.CompDefTransformBuilder .. py:class:: CompDefTransformBuilder(comp_child_builders: raesl.compile.typechecking.compdef_builder.CompDefChildBuilders) Bases: :py:obj:`raesl.compile.typechecking.goal_transform_base.GoalTransformBaseBuilder` Collect transformations of a component from the parser, check them, and add them to the component definition. :param comp_child_builders: Storage of child builders for a component definition. .. attribute:: transforms Collected transformations. .. attribute:: transform_kind Last found kind of transformation kind, either 'requirement' or 'constraint'. .. py:method:: new_transform_header(transform_kind: raesl.compile.scanner.Token) New transform section line found. :param transform_kind: Kind of transformations that will follow. .. py:method:: add_transform(transform: raesl.compile.ast.components.Transformation) A new transformation has been found, add it to the collection. :param transform: Transformation to add. .. py:method:: add_transform_subclause(sub_clause: raesl.compile.ast.components.SubClause) Add a found subclause that belongs to the last transformation. .. py:method:: finish_comp(comp_def: raesl.compile.ast.components.ComponentDefinition, spec: raesl.compile.ast.specification.Specification) Check the found transformations, and add them to the component. :param comp_def: Component definition to extend with the found relation instances. Also a source of available variables, parameters, and variable groups. :param spec: Specification being constructed. Source for types and relation definitions processed previously.