Skip to content

Commit afd99b4

Browse files
eugen-shulimovibbem
authored andcommitted
feat: prepare DiffNode for storing endif lines
1 parent 3e04daf commit afd99b4

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • src/main/java/org/variantsync/diffdetective/variation/diff

src/main/java/org/variantsync/diffdetective/variation/diff/DiffNode.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public class DiffNode<L extends Label> implements HasNodeType {
5151

5252
private Node featureMapping;
5353

54+
private String endIf = null;
55+
5456
/**
5557
* The parents {@link DiffNode} before and after the edit.
5658
* This array has to be indexed by {@code Time.ordinal()}
@@ -146,6 +148,22 @@ public void setLabel(L newLabel) {
146148
label.setInnerLabel(newLabel);
147149
}
148150

151+
/**
152+
* Returns the line with the endif of the corresponding if, if the node is an if node, otherwise null
153+
* @return String, the Line with endif
154+
*/
155+
public String getEndIf() {
156+
return endIf;
157+
}
158+
159+
/**
160+
* Sets the line with the endif of the corresponding if, if the node is an if node
161+
* @param endIf String, the Line with endif
162+
*/
163+
public void setEndIf(String endIf) {
164+
this.endIf = endIf;
165+
}
166+
149167
/**
150168
* Gets the first {@code if} node in the path from the root to this node at the time
151169
* {@code time}.

0 commit comments

Comments
 (0)