raesl.compile.typechecking.compdef_goal_builder
#
Code for collecting and adding goals to component definitions.
Module Contents#
Classes#
Collect goals of a component from the parser, check them, and eventually add them |
- class raesl.compile.typechecking.compdef_goal_builder.CompDefGoalBuilder(comp_child_builders: raesl.compile.typechecking.compdef_builder.CompDefChildBuilders)#
Bases:
raesl.compile.typechecking.goal_transform_base.GoalTransformBaseBuilder
Collect goals of a component from the parser, check them, and eventually add them to the surrounding component definition.
- Parameters:
goals – Found goals in the component.
goal_kind – Last found kind of goal section, ‘requirement’ or ‘constraint’.
- new_goal_header(goal_kind: raesl.compile.scanner.Token)#
New goal header line found.
- Parameters:
goal_kind – Kind of goals that will follow.
- add_goal(goal: raesl.compile.ast.components.Goal)#
New goal has been found by the parser, add it to the found goals.
- Parameters:
goal – Goal to add.
- add_goal_subclause(sub_clause: raesl.compile.ast.components.SubClause)#
Subclause of the last goal has been found, add it to the last goal.
- finish_comp(comp_def: raesl.compile.ast.components.ComponentDefinition, spec: raesl.compile.ast.specification.Specification)#
Check the found goals, and add them to the component.