use of org.cx4a.rsense.parser.TypeAnnotationLexer in project rsense by m2ym.
the class AnnotationHelper method parseAnnotation.
public static TypeAnnotation parseAnnotation(String annot, int lineno) {
if (annot.startsWith("#%")) {
ANTLRStringStream in = new ANTLRStringStream(annot.substring(2));
in.setLine(lineno);
TypeAnnotationLexer lex = new TypeAnnotationLexer(in);
CommonTokenStream tokens = new CommonTokenStream(lex);
TypeAnnotationParser parser = new TypeAnnotationParser(tokens);
try {
return parser.type();
} catch (RecognitionException e) {
}
}
return null;
}
Aggregations