Skip to content

Commit 22d5dea

Browse files
eugen-shulimovibbem
authored andcommitted
feat: add a getter for the endif line in VariationNode
1 parent 4bed4b5 commit 22d5dea

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,9 @@ public Node getFormula() {
121121
public int getID() {
122122
return getBackingNode().getID();
123123
}
124+
125+
@Override
126+
public String getEndIf() {
127+
return getBackingNode().getEndIf();
128+
}
124129
};

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ public VariationNode<T, L> downCast() {
113113
*/
114114
public abstract List<T> getChildren();
115115

116+
/**
117+
* Returns the line with the endif of the corresponding if, if the node is an if node, otherwise null
118+
* @return String, the Line with endif
119+
*/
120+
public abstract String getEndIf();
121+
116122
/**
117123
* Returns {@code true} iff this node has no parent.
118124
*

0 commit comments

Comments
 (0)