Interface AnnotationParser
- All Known Implementing Classes:
CPPAnnotationParser
,JPPAnnotationParser
,PreprocessorAnnotationParser
public interface AnnotationParser
Interface for a parser that analyzes annotations in parsed text. The parser is responsible for determining the type
of the annotation (see
AnnotationType
), and parsing the annotation into a Node
.
See PreprocessorAnnotationParser
for an example of how an implementation of AnnotationParser could look like.
-
Method Summary
Modifier and TypeMethodDescriptionparseAnnotation
(String line) Parse the given line as an annotation.
-
Method Details
-
parseAnnotation
Parse the given line as an annotation. Note thatline
might also be a line in a diff (i.e., preceded by-
or+
).- Parameters:
line
- that might contain an annotation- Returns:
- the annotation type and the associated formula.
If
line
doesn't contain an annotation, returnsAnnotation(AnnotationType.NONE)
. - Throws:
UnparseableFormulaException
- if an annotation is detected but it is malformed
-