Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fnhartmann committed Dec 7, 2023
1 parent 3176e98 commit 0d5b1df
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def _get_equalizable_last_definitions(loop_node: WhileLoopNode, continuation: As
:param loop_node: While-loop to search in
:param continuation: Instruction defining the for-loops modification
:param variable_init: Instruction defining the for-loops declaration
:return: List of equalizable last definitions, None if at least one continue node does not match the requirements
"""
equalizable_nodes = []
Expand Down Expand Up @@ -302,9 +301,8 @@ def _substract_continuation_from_last_definition(last_definition: Assignment, co
Substracts the value of the continuation instruction from the last definition, which must be a simple binary operation or a constant,
defining the same value as the continuation instruction in the given code node.
:param code_node: Code node whose last instruction is to be changed
:param last_definition: Last definition that is to be changed
:param continuation: Instruction defining the for-loops modification
:param variable_init: Instruction defining the for-loops declaration
"""
last_definition.substitute(
last_definition.value, BinaryOperation(OperationType.minus, [last_definition.value, continuation.instruction.value.right])
Expand Down

0 comments on commit 0d5b1df

Please sign in to comment.