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

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

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

Parser.exitLoop介绍

暂无

代码示例

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

  1. private WhileLoop whileLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.WHILE) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg;
  7. WhileLoop pn = new WhileLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. ConditionData data = condition();
  12. pn.setCondition(data.condition);
  13. pn.setParens(data.lp - pos, data.rp - pos);
  14. AstNode body = statement();
  15. pn.setLength(getNodeEnd(body) - pos);
  16. pn.setBody(body);
  17. } finally {
  18. exitLoop();
  19. }
  20. return pn;
  21. }

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

  1. private WhileLoop whileLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.WHILE) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg;
  7. WhileLoop pn = new WhileLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. ConditionData data = condition();
  12. pn.setCondition(data.condition);
  13. pn.setParens(data.lp - pos, data.rp - pos);
  14. AstNode body = statement();
  15. pn.setLength(getNodeEnd(body) - pos);
  16. pn.setBody(body);
  17. } finally {
  18. exitLoop();
  19. }
  20. return pn;
  21. }

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

  1. private WhileLoop whileLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.WHILE) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg;
  7. WhileLoop pn = new WhileLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. ConditionData data = condition();
  12. pn.setCondition(data.condition);
  13. pn.setParens(data.lp - pos, data.rp - pos);
  14. AstNode body = statement();
  15. pn.setLength(getNodeEnd(body) - pos);
  16. pn.setBody(body);
  17. } finally {
  18. exitLoop();
  19. }
  20. return pn;
  21. }

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

  1. private WhileLoop whileLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.WHILE) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg;
  7. WhileLoop pn = new WhileLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. ConditionData data = condition();
  12. pn.setCondition(data.condition);
  13. pn.setParens(data.lp - pos, data.rp - pos);
  14. AstNode body = statement();
  15. pn.setLength(getNodeEnd(body) - pos);
  16. pn.setBody(body);
  17. } finally {
  18. exitLoop();
  19. }
  20. return pn;
  21. }

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

  1. private DoLoop doLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.DO) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg, end;
  7. DoLoop pn = new DoLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. AstNode body = statement();
  12. mustMatchToken(Token.WHILE, "msg.no.while.do");
  13. pn.setWhilePosition(ts.tokenBeg - pos);
  14. ConditionData data = condition();
  15. pn.setCondition(data.condition);
  16. pn.setParens(data.lp - pos, data.rp - pos);
  17. end = getNodeEnd(body);
  18. pn.setBody(body);
  19. } finally {
  20. exitLoop();
  21. }
  22. // Always auto-insert semicolon to follow SpiderMonkey:
  23. // It is required by ECMAScript but is ignored by the rest of
  24. // world, see bug 238945
  25. if (matchToken(Token.SEMI)) {
  26. end = ts.tokenEnd;
  27. }
  28. pn.setLength(end - pos);
  29. return pn;
  30. }

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

  1. private DoLoop doLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.DO) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg, end;
  7. DoLoop pn = new DoLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. AstNode body = statement();
  12. mustMatchToken(Token.WHILE, "msg.no.while.do");
  13. pn.setWhilePosition(ts.tokenBeg - pos);
  14. ConditionData data = condition();
  15. pn.setCondition(data.condition);
  16. pn.setParens(data.lp - pos, data.rp - pos);
  17. end = getNodeEnd(body);
  18. pn.setBody(body);
  19. } finally {
  20. exitLoop();
  21. }
  22. // Always auto-insert semicolon to follow SpiderMonkey:
  23. // It is required by ECMAScript but is ignored by the rest of
  24. // world, see bug 238945
  25. if (matchToken(Token.SEMI)) {
  26. end = ts.tokenEnd;
  27. }
  28. pn.setLength(end - pos);
  29. return pn;
  30. }

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

  1. private DoLoop doLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.DO) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg, end;
  7. DoLoop pn = new DoLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. AstNode body = statement();
  12. mustMatchToken(Token.WHILE, "msg.no.while.do");
  13. pn.setWhilePosition(ts.tokenBeg - pos);
  14. ConditionData data = condition();
  15. pn.setCondition(data.condition);
  16. pn.setParens(data.lp - pos, data.rp - pos);
  17. end = getNodeEnd(body);
  18. pn.setBody(body);
  19. } finally {
  20. exitLoop();
  21. }
  22. // Always auto-insert semicolon to follow SpiderMonkey:
  23. // It is required by ECMAScript but is ignored by the rest of
  24. // world, see bug 238945
  25. if (matchToken(Token.SEMI)) {
  26. end = ts.tokenEnd;
  27. }
  28. pn.setLength(end - pos);
  29. return pn;
  30. }

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

  1. private DoLoop doLoop()
  2. throws IOException
  3. {
  4. if (currentToken != Token.DO) codeBug();
  5. consumeToken();
  6. int pos = ts.tokenBeg, end;
  7. DoLoop pn = new DoLoop(pos);
  8. pn.setLineno(ts.lineno);
  9. enterLoop(pn);
  10. try {
  11. AstNode body = statement();
  12. mustMatchToken(Token.WHILE, "msg.no.while.do");
  13. pn.setWhilePosition(ts.tokenBeg - pos);
  14. ConditionData data = condition();
  15. pn.setCondition(data.condition);
  16. pn.setParens(data.lp - pos, data.rp - pos);
  17. end = getNodeEnd(body);
  18. pn.setBody(body);
  19. } finally {
  20. exitLoop();
  21. }
  22. // Always auto-insert semicolon to follow SpiderMonkey:
  23. // It is required by ECMAScript but is ignored by the rest of
  24. // world, see bug 238945
  25. if (matchToken(Token.SEMI)) {
  26. end = ts.tokenEnd;
  27. }
  28. pn.setLength(end - pos);
  29. return pn;
  30. }

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

  1. pn.setBody(body);
  2. } finally {
  3. exitLoop();

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

  1. pn.setBody(body);
  2. } finally {
  3. exitLoop();

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

  1. pn.setBody(body);
  2. } finally {
  3. exitLoop();

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

  1. pn.setBody(body);
  2. } finally {
  3. exitLoop();

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

  1. isForEach);
  2. } finally {
  3. exitLoop(false);

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

  1. pn = nf.createWhile(loop, cond, body);
  2. } finally {
  3. exitLoop();
  4. pn = nf.createDoWhile(loop, body, cond);
  5. } finally {
  6. exitLoop();
  7. exitLoop();

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

  1. pn = nf.createWhile(loop, cond, body);
  2. } finally {
  3. exitLoop();
  4. pn = nf.createDoWhile(loop, body, cond);
  5. } finally {
  6. exitLoop();
  7. exitLoop();

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

  1. pn = nf.createWhile(loop, cond, body);
  2. } finally {
  3. exitLoop(true);
  4. pn = nf.createDoWhile(loop, body, cond);
  5. } finally {
  6. exitLoop(true);
  7. exitLoop(true);

相关文章

Parser类方法