:py:mod:`raesl.compile.typechecking.compdef_varparam_builder` ============================================================= .. py:module:: raesl.compile.typechecking.compdef_varparam_builder .. autoapi-nested-parse:: Variables and components in a component definition. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: raesl.compile.typechecking.compdef_varparam_builder.CompDefVarParamBuilder Functions ~~~~~~~~~ .. autoapisummary:: raesl.compile.typechecking.compdef_varparam_builder._make_varnodes .. py:class:: CompDefVarParamBuilder(comp_child_builders: raesl.compile.typechecking.compdef_builder.CompDefChildBuilders, varparam_counter: raesl.compile.typechecking.compdef_builder.Counter) Collect and check variables of a component definition. :param comp_child_builders: Storage of child builders for a component definition. :param varparam_counter: Object for handing out unique numbers to elementary var/param nodes. .. attribute:: variables Variables of the component. .. attribute:: parameters Parameters of the component. .. py:method:: add_variables(new_vars: List[raesl.compile.ast.components.VarParam]) Add variables of the component definition to the collection. .. py:method:: add_parameters(new_params: List[raesl.compile.ast.components.VarParam]) Add parameters of the component definition to the collection. .. py:method:: finish_comp(comp_def: raesl.compile.ast.components.ComponentDefinition, spec: raesl.compile.ast.specification.Specification) Check the collected variables and parameters, report errors, and add the instances to the given component. :param comp_def: Component definition to extend with the found variables and parameters. :param spec: Specification being constructed. Source for types, verbs and relation definitions processed previously. .. py:function:: _make_varnodes(name_tok: raesl.compile.scanner.Token, the_type: raesl.compile.ast.types.BaseType, varparam_counter: raesl.compile.typechecking.compdef_builder.Counter) Make a VarNode tree that matches the shape of the type.