@VisibleForTesting
static ParseTreeNode parse(InputSource is, CharProducer cp, String mime, MessageQueue mq)
throws ParseException {
ParseTreeNode ptn;
if (mime.contains("javascript")) {
JsLexer lexer = new JsLexer(cp);
JsTokenQueue tq = new JsTokenQueue(lexer, is);
if (tq.isEmpty()) { return null; }
Parser p = new Parser(tq, mq);
ptn = p.parse();
tq.expectEmpty();