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

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

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

Parser.nextToken介绍

暂无

代码示例

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

/**
 * Xml attribute expression:<p>
 *   {@code @attr}, {@code @ns::attr}, {@code @ns::*}, {@code @ns::*},
 *   {@code @*}, {@code @*::attr}, {@code @*::*}, {@code @ns::[expr]},
 *   {@code @*::[expr]}, {@code @[expr]} <p>
 * Called if we peeked an '@' token.
 */
private AstNode attributeAccess()
  throws IOException
{
  int tt = nextToken(), atPos = ts.tokenBeg;
  switch (tt) {
   // handles: @name, @ns::name, @ns::*, @ns::[expr]
   case Token.NAME:
     return propertyName(atPos, ts.getString(), 0);
   // handles: @*, @*::name, @*::*, @*::[expr]
   case Token.MUL:
     saveNameTokenData(ts.tokenBeg, "*", ts.lineno);
     return propertyName(atPos, "*", 0);
   // handles @[expr]
   case Token.LB:
     return xmlElemRef(atPos, null, -1);
   default:
     reportError("msg.no.name.after.xmlAttr");
     return makeErrorNode();
  }
}

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

/**
 * Xml attribute expression:<p>
 *   {@code @attr}, {@code @ns::attr}, {@code @ns::*}, {@code @ns::*},
 *   {@code @*}, {@code @*::attr}, {@code @*::*}, {@code @ns::[expr]},
 *   {@code @*::[expr]}, {@code @[expr]} <p>
 * Called if we peeked an '@' token.
 */
private AstNode attributeAccess()
  throws IOException
{
  int tt = nextToken(), atPos = ts.tokenBeg;
  switch (tt) {
   // handles: @name, @ns::name, @ns::*, @ns::[expr]
   case Token.NAME:
     return propertyName(atPos, ts.getString(), 0);
   // handles: @*, @*::name, @*::*, @*::[expr]
   case Token.MUL:
     saveNameTokenData(ts.tokenBeg, "*", ts.lineno);
     return propertyName(atPos, "*", 0);
   // handles @[expr]
   case Token.LB:
     return xmlElemRef(atPos, null, -1);
   default:
     reportError("msg.no.name.after.xmlAttr");
     return makeErrorNode();
  }
}

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

/**
 * Xml attribute expression:<p>
 *   {@code @attr}, {@code @ns::attr}, {@code @ns::*}, {@code @ns::*},
 *   {@code @*}, {@code @*::attr}, {@code @*::*}, {@code @ns::[expr]},
 *   {@code @*::[expr]}, {@code @[expr]} <p>
 * Called if we peeked an '@' token.
 */
private AstNode attributeAccess()
  throws IOException
{
  int tt = nextToken(), atPos = ts.tokenBeg;
  switch (tt) {
   // handles: @name, @ns::name, @ns::*, @ns::[expr]
   case Token.NAME:
     return propertyName(atPos, ts.getString(), 0);
   // handles: @*, @*::name, @*::*, @*::[expr]
   case Token.MUL:
     saveNameTokenData(ts.tokenBeg, "*", ts.lineno);
     return propertyName(atPos, "*", 0);
   // handles @[expr]
   case Token.LB:
     return xmlElemRef(atPos, null, -1);
   default:
     reportError("msg.no.name.after.xmlAttr");
     return makeErrorNode();
  }
}

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

/**
 * Xml attribute expression:<p>
 *   {@code @attr}, {@code @ns::attr}, {@code @ns::*}, {@code @ns::*},
 *   {@code @*}, {@code @*::attr}, {@code @*::*}, {@code @ns::[expr]},
 *   {@code @*::[expr]}, {@code @[expr]} <p>
 * Called if we peeked an '@' token.
 */
private AstNode attributeAccess()
  throws IOException
{
  int tt = nextToken(), atPos = ts.tokenBeg;
  switch (tt) {
   // handles: @name, @ns::name, @ns::*, @ns::[expr]
   case Token.NAME:
     return propertyName(atPos, ts.getString(), 0);
   // handles: @*, @*::name, @*::*, @*::[expr]
   case Token.MUL:
     saveNameTokenData(ts.tokenBeg, "*", ts.lineno);
     return propertyName(atPos, "*", 0);
   // handles @[expr]
   case Token.LB:
     return xmlElemRef(atPos, null, -1);
   default:
     reportError("msg.no.name.after.xmlAttr");
     return makeErrorNode();
  }
}

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

namespace = name;
int tt = nextToken();
switch (tt) {

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

int tt = nextToken();

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

int tt = nextToken();

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

int tt = nextToken();

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

namespace = name;
int tt = nextToken();
switch (tt) {

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

namespace = name;
int tt = nextToken();
switch (tt) {

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

colonPos = ts.tokenBeg;
switch (nextToken()) {

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

colonPos = ts.tokenBeg;
switch (nextToken()) {

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

colonPos = ts.tokenBeg;
switch (nextToken()) {

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

colonPos = ts.tokenBeg;
switch (nextToken()) {

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

private ArrayComprehensionLoop arrayComprehensionLoop()
  throws IOException
  if (nextToken() != Token.FOR) codeBug();
  int pos = ts.tokenBeg;
  int eachPos = -1, lp = -1, rp = -1, inPos = -1;

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

private GeneratorExpressionLoop generatorExpressionLoop()
  throws IOException
  if (nextToken() != Token.FOR) codeBug();
  int pos = ts.tokenBeg;
  int lp = -1, rp = -1, inPos = -1;

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

private GeneratorExpressionLoop generatorExpressionLoop()
  throws IOException
  if (nextToken() != Token.FOR) codeBug();
  int pos = ts.tokenBeg;
  int lp = -1, rp = -1, inPos = -1;

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

private GeneratorExpressionLoop generatorExpressionLoop()
  throws IOException
  if (nextToken() != Token.FOR) codeBug();
  int pos = ts.tokenBeg;
  int lp = -1, rp = -1, inPos = -1;

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

private GeneratorExpressionLoop generatorExpressionLoop()
  throws IOException
  if (nextToken() != Token.FOR) codeBug();
  int pos = ts.tokenBeg;
  int lp = -1, rp = -1, inPos = -1;

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

int tt;
switchLoop: for (;;) {
  tt = nextToken();
  int casePos = ts.tokenBeg;
  int caseLineno = ts.lineno;

相关文章

Parser类方法