Esempio n. 1
0
 protected Tuple<ISimpleNode, Throwable> parseILegalDocSuccessfully(IDocument doc) {
   parser.setDocument(doc, false, null);
   Tuple<ISimpleNode, Throwable> objects = parser.reparseDocument();
   Throwable err = objects.o2;
   if (err == null) {
     fail("Expected a ParseException and the doc was successfully parsed.");
   }
   if (!(err instanceof ParseException) && !(err instanceof TokenMgrError)) {
     fail("Expected a ParseException and received:" + err.getClass());
   }
   if (objects.o1 == null) {
     fail("Expected the ast to be generated with the parse. Error: " + objects.o2.getMessage());
   }
   return objects;
 }