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

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

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

Parser.addWarning介绍

暂无

代码示例

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

void addWarning(String messageId, String messageArg) {
  int beg = -1, end = -1;
  if (ts != null) {
    beg = ts.tokenBeg;
    end = ts.tokenEnd - ts.tokenBeg;
  }
  addWarning(messageId, messageArg, beg, end);
}

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

void addWarning(String messageId, String messageArg) {
  int beg = -1, end = -1;
  if (ts != null) {
    beg = ts.tokenBeg;
    end = ts.tokenEnd - ts.tokenBeg;
  }
  addWarning(messageId, messageArg, beg, end);
}

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

void addWarning(String messageId, String messageArg) {
  int beg = -1, end = -1;
  if (ts != null) {
    beg = ts.tokenBeg;
    end = ts.tokenEnd - ts.tokenBeg;
  }
  addWarning(messageId, messageArg, beg, end);
}

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

void addWarning(String messageId, String messageArg) {
  int beg = -1, end = -1;
  if (ts != null) {
    beg = ts.tokenBeg;
    end = ts.tokenEnd - ts.tokenBeg;
  }
  addWarning(messageId, messageArg, beg, end);
}

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

void addWarning(String messageId, int position, int length) {
  addWarning(messageId, null, position, length);
}

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

void addWarning(String messageId, int position, int length) {
  addWarning(messageId, null, position, length);
}

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

void addWarning(String messageId, int position, int length) {
  addWarning(messageId, null, position, length);
}

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

void addWarning(String messageId, int position, int length) {
  addWarning(messageId, null, position, length);
}

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

void addStrictWarning(String messageId, String messageArg,
           int position, int length) {
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg, position, length);
}

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

void addStrictWarning(String messageId, String messageArg)
{
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg);
}

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

void addStrictWarning(String messageId, String messageArg,
           int position, int length) {
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg, position, length);
}

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

void addStrictWarning(String messageId, String messageArg)
{
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg);
}

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

void addStrictWarning(String messageId, String messageArg,
           int position, int length) {
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg, position, length);
}

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

void addStrictWarning(String messageId, String messageArg)
{
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg);
}

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

private void addStrictWarning(String messageId, String messageArg,
               int position, int length,
               int line, String lineSource, int lineOffset) {
  if (compilerEnv.isStrictMode()) {
    addWarning(messageId, messageArg, position, length, line, lineSource, lineOffset);
  }
}

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

void addStrictWarning(String messageId, String messageArg,
           int position, int length) {
  if (compilerEnv.isStrictMode())
    addWarning(messageId, messageArg, position, length);
}

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

private void warnTrailingComma(int pos, List<?> elems, int commaPos) {
  if (compilerEnv.getWarnTrailingComma()) {
    // back up from comma to beginning of line or array/objlit
    if (!elems.isEmpty()) {
      pos = ((AstNode)elems.get(0)).getPosition();
    }
    pos = Math.max(pos, lineBeginningFor(commaPos));
    addWarning("msg.extra.trailing.comma", pos, commaPos - pos);
  }
}

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

private void warnTrailingComma(int pos, List<?> elems, int commaPos) {
  if (compilerEnv.getWarnTrailingComma()) {
    // back up from comma to beginning of line or array/objlit
    if (!elems.isEmpty()) {
      pos = ((AstNode)elems.get(0)).getPosition();
    }
    pos = Math.max(pos, lineBeginningFor(commaPos));
    addWarning("msg.extra.trailing.comma", pos, commaPos - pos);
  }
}

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

private void warnTrailingComma(int pos, List<?> elems, int commaPos) {
  if (compilerEnv.getWarnTrailingComma()) {
    // back up from comma to beginning of line or array/objlit
    if (!elems.isEmpty()) {
      pos = ((AstNode)elems.get(0)).getPosition();
    }
    pos = Math.max(pos, lineBeginningFor(commaPos));
    addWarning("msg.extra.trailing.comma", pos, commaPos - pos);
  }
}

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

private void warnTrailingComma(int pos, List<?> elems, int commaPos) {
  if (compilerEnv.getWarnTrailingComma()) {
    // back up from comma to beginning of line or array/objlit
    if (!elems.isEmpty()) {
      pos = ((AstNode)elems.get(0)).getPosition();
    }
    pos = Math.max(pos, lineBeginningFor(commaPos));
    addWarning("msg.extra.trailing.comma", pos, commaPos - pos);
  }
}

相关文章

Parser类方法