String context = tokens.nextToken("\n");
String pointer = tokens.nextToken("\n");
int startcolumn = pointer.indexOf("^");
int endcolumn = context.indexOf(" ", startcolumn);
if (endcolumn == -1) endcolumn = context.length();
return new CompilerError(file, false, line, startcolumn, line, endcolumn, message);
} catch(NoSuchElementException nse) {
return new CompilerError("no more tokens - could not parse error message: " + error);
} catch(Exception nse) {
return new CompilerError("could not parse error message: " + error);
}
}