-
-
Notifications
You must be signed in to change notification settings - Fork 183
Expand file tree
/
Copy pathRewriteResult.java
More file actions
43 lines (35 loc) · 953 Bytes
/
Copy pathRewriteResult.java
File metadata and controls
43 lines (35 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package processing.mode.java.preproc;
import java.util.List;
/**
* Data structure describing the result of preprocessor rewrite.
*/
public class RewriteResult {
private final int lineOffset;
private final List<TextTransform.Edit> edits;
/**
* Create a new rewrite result structure.
*
* @param newLineOffset The number of lines added during rewrite.
* @param newEdits The edits generated during rewrite.
*/
public RewriteResult(int newLineOffset, List<TextTransform.Edit> newEdits) {
lineOffset = newLineOffset;
edits = newEdits;
}
/**
* Get the number of lines added during rewrite.
*
* @return The additional offset to add to the preprocessor line offset.
*/
public int getLineOffset() {
return lineOffset;
}
/**
* Get the edits generated during rewrite.
*
* @return Edits generated during rewrite.
*/
public List<TextTransform.Edit> getEdits() {
return edits;
}
}