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

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

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

Parser.addError介绍

暂无

代码示例

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

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

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

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

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

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

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

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

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

  1. void addError(String messageId, int position, int length) {
  2. addError(messageId, null, position, length);
  3. }

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

  1. RuntimeException reportError(String messageId)
  2. {
  3. addError(messageId);
  4. // Throw a ParserException exception to unwind the recursive descent
  5. // parse.
  6. throw new ParserException();
  7. }

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

  1. RuntimeException reportError(String messageId)
  2. {
  3. addError(messageId);
  4. // Throw a ParserException exception to unwind the recursive descent
  5. // parse.
  6. throw new ParserException();
  7. }

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

  1. RuntimeException reportError(String messageId)
  2. {
  3. addError(messageId);
  4. // Throw a ParserException exception to unwind the recursive descent
  5. // parse.
  6. throw new ParserException();
  7. }

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

  1. void reportError(String messageId, String messageArg, int position,
  2. int length)
  3. {
  4. addError(messageId, position, length);
  5. if (!compilerEnv.recoverFromErrors()) {
  6. throw new ParserException();
  7. }
  8. }

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

  1. void reportError(String messageId, String messageArg, int position,
  2. int length)
  3. {
  4. addError(messageId, position, length);
  5. if (!compilerEnv.recoverFromErrors()) {
  6. throw new ParserException();
  7. }
  8. }

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

  1. void reportError(String messageId, String messageArg, int position,
  2. int length)
  3. {
  4. addError(messageId, position, length);
  5. if (!compilerEnv.recoverFromErrors()) {
  6. throw new ParserException();
  7. }
  8. }

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

  1. void reportError(String messageId, String messageArg, int position,
  2. int length)
  3. {
  4. addError(messageId, position, length);
  5. if (!compilerEnv.recoverFromErrors()) {
  6. throw new ParserException();
  7. }
  8. }

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

  1. /**
  2. *
  3. */
  4. private boolean readQuotedString(int quote) throws IOException
  5. {
  6. for (int c = getChar(); c != EOF_CHAR; c = getChar()) {
  7. addToString(c);
  8. if (c == quote) return true;
  9. }
  10. stringBufferTop = 0; // throw away the string in progress
  11. this.string = null;
  12. parser.addError("msg.XML.bad.form");
  13. return false;
  14. }

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

  1. /**
  2. *
  3. */
  4. private boolean readQuotedString(int quote) throws IOException
  5. {
  6. for (int c = getChar(); c != EOF_CHAR; c = getChar()) {
  7. addToString(c);
  8. if (c == quote) return true;
  9. }
  10. stringBufferTop = 0; // throw away the string in progress
  11. this.string = null;
  12. parser.addError("msg.XML.bad.form");
  13. return false;
  14. }

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

  1. /**
  2. *
  3. */
  4. private boolean readQuotedString(int quote) throws IOException
  5. {
  6. for (int c = getChar(); c != EOF_CHAR; c = getChar()) {
  7. addToString(c);
  8. if (c == quote) return true;
  9. }
  10. stringBufferTop = 0; // throw away the string in progress
  11. this.string = null;
  12. parser.addError("msg.XML.bad.form");
  13. return false;
  14. }

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

  1. private void addWarning(String messageId, String messageArg,
  2. int position, int length,
  3. int line, String lineSource, int lineOffset) {
  4. String message = lookupMessage(messageId, messageArg);
  5. if (compilerEnv.reportWarningAsError()) {
  6. addError(messageId, messageArg, position, length, line, lineSource, lineOffset);
  7. } else if (errorCollector != null) {
  8. errorCollector.warning(message, sourceURI, position, length);
  9. } else {
  10. errorReporter.warning(message, sourceURI, line, lineSource, lineOffset);
  11. }
  12. }

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

  1. void addWarning(String messageId, String messageArg,
  2. int position, int length)
  3. {
  4. String message = lookupMessage(messageId, messageArg);
  5. if (compilerEnv.reportWarningAsError()) {
  6. addError(messageId, messageArg, position, length);
  7. } else if (errorCollector != null) {
  8. errorCollector.warning(message, sourceURI, position, length);
  9. } else {
  10. errorReporter.warning(message, sourceURI, ts.getLineno(),
  11. ts.getLine(), ts.getOffset());
  12. }
  13. }

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

  1. void addWarning(String messageId, String messageArg,
  2. int position, int length)
  3. {
  4. String message = lookupMessage(messageId, messageArg);
  5. if (compilerEnv.reportWarningAsError()) {
  6. addError(messageId, messageArg, position, length);
  7. } else if (errorCollector != null) {
  8. errorCollector.warning(message, sourceURI, position, length);
  9. } else {
  10. errorReporter.warning(message, sourceURI, ts.getLineno(),
  11. ts.getLine(), ts.getOffset());
  12. }
  13. }

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

  1. void addWarning(String messageId, String messageArg,
  2. int position, int length)
  3. {
  4. String message = lookupMessage(messageId, messageArg);
  5. if (compilerEnv.reportWarningAsError()) {
  6. addError(messageId, messageArg, position, length);
  7. } else if (errorCollector != null) {
  8. errorCollector.warning(message, sourceURI, position, length);
  9. } else {
  10. errorReporter.warning(message, sourceURI, ts.getLineno(),
  11. ts.getLine(), ts.getOffset());
  12. }
  13. }

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

  1. void addWarning(String messageId, String messageArg,
  2. int position, int length)
  3. {
  4. String message = lookupMessage(messageId, messageArg);
  5. if (compilerEnv.reportWarningAsError()) {
  6. addError(messageId, messageArg, position, length);
  7. } else if (errorCollector != null) {
  8. errorCollector.warning(message, sourceURI, position, length);
  9. } else {
  10. errorReporter.warning(message, sourceURI, ts.getLineno(),
  11. ts.getLine(), ts.getOffset());
  12. }
  13. }

相关文章

Parser类方法