use of japa.parser.TokenMgrError in project japid42 by branaway.
the class JavaSyntaxTool method parse.
public static CompilationUnit parse(String src) throws ParseException {
ByteArrayInputStream in;
try {
in = new ByteArrayInputStream(src.getBytes(UTF_8));
CompilationUnit cu;
cu = JavaParser.parse(in, UTF_8);
return cu;
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TokenMgrError e) {
throw new ParseException(e.getMessage());
}
return null;
}
use of japa.parser.TokenMgrError in project Japid by branaway.
the class JavaSyntaxTool method parse.
public static CompilationUnit parse(String src) throws ParseException {
ByteArrayInputStream in;
try {
in = new ByteArrayInputStream(src.getBytes(UTF_8));
CompilationUnit cu;
cu = JavaParser.parse(in, UTF_8);
return cu;
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TokenMgrError e) {
throw new ParseException(e.getMessage());
}
return null;
}
Aggregations