org.mozilla.javascript.Parser.exitLoop()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 JavaScript  
字(5.5k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中org.mozilla.javascript.Parser.exitLoop()方法的一些代码示例,展示了Parser.exitLoop()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.exitLoop()方法的具体详情如下:
包路径:org.mozilla.javascript.Parser
类名称:Parser
方法名:exitLoop

Parser.exitLoop介绍

暂无

代码示例

代码示例来源:origin: geogebra/geogebra

private WhileLoop whileLoop()
  throws IOException
{
  if (currentToken != Token.WHILE) codeBug();
  consumeToken();
  int pos = ts.tokenBeg;
  WhileLoop pn = new WhileLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    AstNode body = statement();
    pn.setLength(getNodeEnd(body) - pos);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  return pn;
}

代码示例来源:origin: ro.isdc.wro4j/rhino

private WhileLoop whileLoop()
  throws IOException
{
  if (currentToken != Token.WHILE) codeBug();
  consumeToken();
  int pos = ts.tokenBeg;
  WhileLoop pn = new WhileLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    AstNode body = statement();
    pn.setLength(getNodeEnd(body) - pos);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  return pn;
}

代码示例来源:origin: io.apigee/rhino

private WhileLoop whileLoop()
  throws IOException
{
  if (currentToken != Token.WHILE) codeBug();
  consumeToken();
  int pos = ts.tokenBeg;
  WhileLoop pn = new WhileLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    AstNode body = statement();
    pn.setLength(getNodeEnd(body) - pos);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  return pn;
}

代码示例来源:origin: com.github.tntim96/rhino

private WhileLoop whileLoop()
  throws IOException
{
  if (currentToken != Token.WHILE) codeBug();
  consumeToken();
  int pos = ts.tokenBeg;
  WhileLoop pn = new WhileLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    AstNode body = statement();
    pn.setLength(getNodeEnd(body) - pos);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  return pn;
}

代码示例来源:origin: com.github.tntim96/rhino

private DoLoop doLoop()
  throws IOException
{
  if (currentToken != Token.DO) codeBug();
  consumeToken();
  int pos = ts.tokenBeg, end;
  DoLoop pn = new DoLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    AstNode body = statement();
    mustMatchToken(Token.WHILE, "msg.no.while.do");
    pn.setWhilePosition(ts.tokenBeg - pos);
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    end = getNodeEnd(body);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  // Always auto-insert semicolon to follow SpiderMonkey:
  // It is required by ECMAScript but is ignored by the rest of
  // world, see bug 238945
  if (matchToken(Token.SEMI)) {
    end = ts.tokenEnd;
  }
  pn.setLength(end - pos);
  return pn;
}

代码示例来源:origin: ro.isdc.wro4j/rhino

private DoLoop doLoop()
  throws IOException
{
  if (currentToken != Token.DO) codeBug();
  consumeToken();
  int pos = ts.tokenBeg, end;
  DoLoop pn = new DoLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    AstNode body = statement();
    mustMatchToken(Token.WHILE, "msg.no.while.do");
    pn.setWhilePosition(ts.tokenBeg - pos);
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    end = getNodeEnd(body);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  // Always auto-insert semicolon to follow SpiderMonkey:
  // It is required by ECMAScript but is ignored by the rest of
  // world, see bug 238945
  if (matchToken(Token.SEMI)) {
    end = ts.tokenEnd;
  }
  pn.setLength(end - pos);
  return pn;
}

代码示例来源:origin: geogebra/geogebra

private DoLoop doLoop()
  throws IOException
{
  if (currentToken != Token.DO) codeBug();
  consumeToken();
  int pos = ts.tokenBeg, end;
  DoLoop pn = new DoLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    AstNode body = statement();
    mustMatchToken(Token.WHILE, "msg.no.while.do");
    pn.setWhilePosition(ts.tokenBeg - pos);
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    end = getNodeEnd(body);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  // Always auto-insert semicolon to follow SpiderMonkey:
  // It is required by ECMAScript but is ignored by the rest of
  // world, see bug 238945
  if (matchToken(Token.SEMI)) {
    end = ts.tokenEnd;
  }
  pn.setLength(end - pos);
  return pn;
}

代码示例来源:origin: io.apigee/rhino

private DoLoop doLoop()
  throws IOException
{
  if (currentToken != Token.DO) codeBug();
  consumeToken();
  int pos = ts.tokenBeg, end;
  DoLoop pn = new DoLoop(pos);
  pn.setLineno(ts.lineno);
  enterLoop(pn);
  try {
    AstNode body = statement();
    mustMatchToken(Token.WHILE, "msg.no.while.do");
    pn.setWhilePosition(ts.tokenBeg - pos);
    ConditionData data = condition();
    pn.setCondition(data.condition);
    pn.setParens(data.lp - pos, data.rp - pos);
    end = getNodeEnd(body);
    pn.setBody(body);
  } finally {
    exitLoop();
  }
  // Always auto-insert semicolon to follow SpiderMonkey:
  // It is required by ECMAScript but is ignored by the rest of
  // world, see bug 238945
  if (matchToken(Token.SEMI)) {
    end = ts.tokenEnd;
  }
  pn.setLength(end - pos);
  return pn;
}

代码示例来源:origin: com.github.tntim96/rhino

pn.setBody(body);
} finally {
  exitLoop();

代码示例来源:origin: geogebra/geogebra

pn.setBody(body);
} finally {
  exitLoop();

代码示例来源:origin: io.apigee/rhino

pn.setBody(body);
} finally {
  exitLoop();

代码示例来源:origin: ro.isdc.wro4j/rhino

pn.setBody(body);
} finally {
  exitLoop();

代码示例来源:origin: rhino/js

isForEach);
} finally {
  exitLoop(false);

代码示例来源:origin: com.yahoo/yuicompressor

pn = nf.createWhile(loop, cond, body);
} finally {
  exitLoop();
  pn = nf.createDoWhile(loop, body, cond);
} finally {
  exitLoop();
  exitLoop();

代码示例来源:origin: com.sun.phobos/phobos-rhino

pn = nf.createWhile(loop, cond, body);
} finally {
  exitLoop();
  pn = nf.createDoWhile(loop, body, cond);
} finally {
  exitLoop();
  exitLoop();

代码示例来源:origin: rhino/js

pn = nf.createWhile(loop, cond, body);
} finally {
  exitLoop(true);
  pn = nf.createDoWhile(loop, body, cond);
} finally {
  exitLoop(true);
  exitLoop(true);

相关文章

微信公众号

Parser类方法