use of com.google.javascript.jscomp.parsing.parser.util.Timer in project closure-compiler by google.
the class Parser method parseProgram.
// 14 Program
public ProgramTree parseProgram() {
Timer t = new Timer("Parse Program");
try {
SourcePosition start = getTreeStartLocation();
ImmutableList<ParseTree> sourceElements = parseGlobalSourceElements();
eat(TokenType.END_OF_FILE);
t.end();
return new ProgramTree(getTreeLocation(start), sourceElements, commentRecorder.getComments());
} catch (StackOverflowError e) {
reportError("Too deep recursion while parsing");
return null;
}
}
Aggregations