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

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

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

Parser.addError介绍

暂无

代码示例

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

void addError(String messageId, String messageArg) {
  addError(messageId, messageArg, ts.tokenBeg,
       ts.tokenEnd - ts.tokenBeg);
}

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

void addError(String messageId, String messageArg) {
  addError(messageId, messageArg, ts.tokenBeg,
       ts.tokenEnd - ts.tokenBeg);
}

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

void addError(String messageId, String messageArg) {
  addError(messageId, messageArg, ts.tokenBeg,
       ts.tokenEnd - ts.tokenBeg);
}

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

void addError(String messageId, String messageArg) {
  addError(messageId, messageArg, ts.tokenBeg,
       ts.tokenEnd - ts.tokenBeg);
}

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

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

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

RuntimeException reportError(String messageId)
{
  addError(messageId);
  // Throw a ParserException exception to unwind the recursive descent
  // parse.
  throw new ParserException();
}

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

RuntimeException reportError(String messageId)
{
  addError(messageId);
  // Throw a ParserException exception to unwind the recursive descent
  // parse.
  throw new ParserException();
}

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

RuntimeException reportError(String messageId)
{
  addError(messageId);
  // Throw a ParserException exception to unwind the recursive descent
  // parse.
  throw new ParserException();
}

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

void reportError(String messageId, String messageArg, int position,
         int length)
{
  addError(messageId, position, length);
  if (!compilerEnv.recoverFromErrors()) {
    throw new ParserException();
  }
}

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

void reportError(String messageId, String messageArg, int position,
         int length)
{
  addError(messageId, position, length);
  if (!compilerEnv.recoverFromErrors()) {
    throw new ParserException();
  }
}

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

void reportError(String messageId, String messageArg, int position,
         int length)
{
  addError(messageId, position, length);
  if (!compilerEnv.recoverFromErrors()) {
    throw new ParserException();
  }
}

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

void reportError(String messageId, String messageArg, int position,
         int length)
{
  addError(messageId, position, length);
  if (!compilerEnv.recoverFromErrors()) {
    throw new ParserException();
  }
}

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

/**
 *
 */
private boolean readQuotedString(int quote) throws IOException
{
  for (int c = getChar(); c != EOF_CHAR; c = getChar()) {
    addToString(c);
    if (c == quote) return true;
  }
  stringBufferTop = 0; // throw away the string in progress
  this.string = null;
  parser.addError("msg.XML.bad.form");
  return false;
}

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

/**
 *
 */
private boolean readQuotedString(int quote) throws IOException
{
  for (int c = getChar(); c != EOF_CHAR; c = getChar()) {
    addToString(c);
    if (c == quote) return true;
  }
  stringBufferTop = 0; // throw away the string in progress
  this.string = null;
  parser.addError("msg.XML.bad.form");
  return false;
}

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

/**
 *
 */
private boolean readQuotedString(int quote) throws IOException
{
  for (int c = getChar(); c != EOF_CHAR; c = getChar()) {
    addToString(c);
    if (c == quote) return true;
  }
  stringBufferTop = 0; // throw away the string in progress
  this.string = null;
  parser.addError("msg.XML.bad.form");
  return false;
}

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

private void addWarning(String messageId, String messageArg,
            int position, int length,
            int line, String lineSource, int lineOffset) {
  String message = lookupMessage(messageId, messageArg);
  if (compilerEnv.reportWarningAsError()) {
    addError(messageId, messageArg, position, length, line, lineSource, lineOffset);
  } else if (errorCollector != null) {
    errorCollector.warning(message, sourceURI, position, length);
  } else {
    errorReporter.warning(message, sourceURI, line, lineSource, lineOffset);
  }
}

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

void addWarning(String messageId, String messageArg,
        int position, int length)
{
  String message = lookupMessage(messageId, messageArg);
  if (compilerEnv.reportWarningAsError()) {
    addError(messageId, messageArg, position, length);
  } else if (errorCollector != null) {
    errorCollector.warning(message, sourceURI, position, length);
  } else {
    errorReporter.warning(message, sourceURI, ts.getLineno(),
               ts.getLine(), ts.getOffset());
  }
}

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

void addWarning(String messageId, String messageArg,
        int position, int length)
{
  String message = lookupMessage(messageId, messageArg);
  if (compilerEnv.reportWarningAsError()) {
    addError(messageId, messageArg, position, length);
  } else if (errorCollector != null) {
    errorCollector.warning(message, sourceURI, position, length);
  } else {
    errorReporter.warning(message, sourceURI, ts.getLineno(),
               ts.getLine(), ts.getOffset());
  }
}

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

void addWarning(String messageId, String messageArg,
        int position, int length)
{
  String message = lookupMessage(messageId, messageArg);
  if (compilerEnv.reportWarningAsError()) {
    addError(messageId, messageArg, position, length);
  } else if (errorCollector != null) {
    errorCollector.warning(message, sourceURI, position, length);
  } else {
    errorReporter.warning(message, sourceURI, ts.getLineno(),
               ts.getLine(), ts.getOffset());
  }
}

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

void addWarning(String messageId, String messageArg,
        int position, int length)
{
  String message = lookupMessage(messageId, messageArg);
  if (compilerEnv.reportWarningAsError()) {
    addError(messageId, messageArg, position, length);
  } else if (errorCollector != null) {
    errorCollector.warning(message, sourceURI, position, length);
  } else {
    errorReporter.warning(message, sourceURI, ts.getLineno(),
               ts.getLine(), ts.getOffset());
  }
}

相关文章

微信公众号

Parser类方法