Skip to content

Commit 4bed4b5

Browse files
eugen-shulimovibbem
authored andcommitted
feat: prepare VariationTreeNode for storing endif lines
1 parent afd99b4 commit 4bed4b5

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/main/java/org/variantsync/diffdetective/variation/tree/VariationTreeNode.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public class VariationTreeNode<L extends Label> extends VariationNode<VariationT
8282
*/
8383
private final List<VariationTreeNode<L>> childOrder;
8484

85+
/**
86+
* The line with the endif of the corresponding if, if the node is an if node, otherwise null
87+
*/
88+
private String endIf = null;
89+
8590
/**
8691
* Creates a new node of a variation tree.
8792
*
@@ -226,6 +231,22 @@ public void removeAllChildren() {
226231
childOrder.clear();
227232
}
228233

234+
/**
235+
* Returns the line with the endif of the corresponding if, if the node is an if node, otherwise null
236+
* @return String, the Line with endif
237+
*/
238+
public String getEndIf() {
239+
return endIf;
240+
}
241+
242+
/**
243+
* Sets the line with the endif of the corresponding if, if the node is an if node
244+
* @param endIf String, the Line with endif
245+
*/
246+
public void setEndIf(String endIf) {
247+
this.endIf = endIf;
248+
}
249+
229250
@Override
230251
public Node getFormula() {
231252
return featureMapping;

0 commit comments

Comments
 (0)