Skip to content

Commit 50c1d8a

Browse files
docs: update documentation of DiffLineFormulaExtractor
1 parent f2d46b6 commit 50c1d8a

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/main/java/org/variantsync/diffdetective/feature/DiffLineFormulaExtractor.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
import org.variantsync.diffdetective.error.UnparseableFormulaException;
44

55
/**
6-
* Extracts the expression from a C preprocessor statement.
7-
* For example, given the annotation "#if defined(A) || B()", the extractor would extract
8-
* "A || B". The extractor detects if, ifdef, ifndef and elif annotations.
9-
* (Other annotations do not have expressions.)
10-
* The given pre-processor statement might also a line in a diff (i.e., preceeded by a - or +).
6+
* Interface for extracting a formula from a line containing an annotation.
7+
* The line might be preceded by a '-', '+', or ' '.
8+
* For example, given the line "+#if defined(A) || B()", the extractor should extract "defined(A) || B".
9+
*
10+
* <p>
11+
* Further alterations of the extracted formula are allowed. For instance, the extracted formula might be abstracted
12+
* (e.g., by simplifying the call to "defined(A)" leaving only the argument "A", or substituting it with "DEFINED_A").
13+
* </p>
1114
*
1215
* @author Paul Bittner, Sören Viegener, Benjamin Moosherr, Alexander Schultheiß
1316
*/
1417
public interface DiffLineFormulaExtractor {
1518
/**
16-
* Extracts the feature formula as a string from a macro line (possibly within a diff).
19+
* Extracts the feature formula as a string from a line (possibly within a diff).
1720
*
1821
* @param line The line of which to get the feature mapping
1922
* @return The feature mapping as a String of the given line

0 commit comments

Comments
 (0)