raesl.compile.typechecking.compdef_compinst_builder#

Builder to add child component instances to a component definition.

Module Contents#

Classes#

CompDefCompInstBuilder

Collect and check child component instances of a component definition.

class raesl.compile.typechecking.compdef_compinst_builder.CompDefCompInstBuilder(comp_child_builders: raesl.compile.typechecking.compdef_builder.CompDefChildBuilders)#

Collect and check child component instances of a component definition.

Parameters:

comp_child_builders – Storage of child builder for a component definition.

diag_store#

Child builders problem store.

instances#

Collected component instances.

last_instance#

Link to last added instance, to allow adding instance arguments to it.

add_compinst(inst_name_tok: raesl.compile.scanner.Token, def_name_tok: raesl.compile.scanner.Token, has_arguments: bool)#

Store a new child component instance line.

add_compinst_arguments(arguments: List[raesl.compile.scanner.Token])#

Store a line of component instance argument names.

get_compdef_names() Set[str]#

Get the names of used definitions.

finish_comp(comp_def: raesl.compile.ast.components.ComponentDefinition, spec: raesl.compile.ast.specification.Specification)#

Finish checking and adding child component instances to the component.

Parameters:
  • comp_def – Used as ‘my’ component definition.

  • spec – Used as source for types.