本文整理了Java中org.mozilla.javascript.Parser.lookupMessage()
方法的一些代码示例,展示了Parser.lookupMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.lookupMessage()
方法的具体详情如下:
包路径:org.mozilla.javascript.Parser
类名称:Parser
方法名:lookupMessage
暂无
代码示例来源:origin: com.github.tntim96/rhino
String lookupMessage(String messageId) {
return lookupMessage(messageId, null);
}
代码示例来源:origin: ro.isdc.wro4j/rhino
String lookupMessage(String messageId) {
return lookupMessage(messageId, null);
}
代码示例来源:origin: io.apigee/rhino
String lookupMessage(String messageId) {
return lookupMessage(messageId, null);
}
代码示例来源:origin: geogebra/geogebra
String lookupMessage(String messageId) {
return lookupMessage(messageId, null);
}
代码示例来源:origin: geogebra/geogebra
private void addError(String messageId, String messageArg,
int position, int length,
int line, String lineSource, int lineOffset) {
++syntaxErrorCount;
String message = lookupMessage(messageId, messageArg);
if (errorCollector != null) {
errorCollector.error(message, sourceURI, position, length);
} else {
errorReporter.error(message, sourceURI, line, lineSource, lineOffset);
}
}
代码示例来源: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: io.apigee/rhino
void addError(String messageId, String messageArg, int position, int length)
{
++syntaxErrorCount;
String message = lookupMessage(messageId, messageArg);
if (errorCollector != null) {
errorCollector.error(message, sourceURI, position, length);
} else {
int lineno = 1, offset = 1;
String line = "";
if (ts != null) { // happens in some regression tests
lineno = ts.getLineno();
line = ts.getLine();
offset = ts.getOffset();
}
errorReporter.error(message, sourceURI, lineno, line, offset);
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
void addError(String messageId, String messageArg, int position, int length)
{
++syntaxErrorCount;
String message = lookupMessage(messageId, messageArg);
if (errorCollector != null) {
errorCollector.error(message, sourceURI, position, length);
} else {
int lineno = 1, offset = 1;
String line = "";
if (ts != null) { // happens in some regression tests
lineno = ts.getLineno();
line = ts.getLine();
offset = ts.getOffset();
}
errorReporter.error(message, sourceURI, lineno, line, offset);
}
}
代码示例来源:origin: com.github.tntim96/rhino
void addError(String messageId, String messageArg, int position, int length)
{
++syntaxErrorCount;
String message = lookupMessage(messageId, messageArg);
if (errorCollector != null) {
errorCollector.error(message, sourceURI, position, length);
} else {
int lineno = 1, offset = 1;
String line = "";
if (ts != null) { // happens in some regression tests
lineno = ts.getLineno();
line = ts.getLine();
offset = ts.getOffset();
}
errorReporter.error(message, sourceURI, lineno, line, offset);
}
}
代码示例来源:origin: geogebra/geogebra
void addError(String messageId, String messageArg, int position, int length)
{
++syntaxErrorCount;
String message = lookupMessage(messageId, messageArg);
if (errorCollector != null) {
errorCollector.error(message, sourceURI, position, length);
} else {
int lineno = 1, offset = 1;
String line = "";
if (ts != null) { // happens in some regression tests
lineno = ts.getLineno();
line = ts.getLine();
offset = ts.getOffset();
}
errorReporter.error(message, sourceURI, lineno, line, offset);
}
}
代码示例来源: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());
}
}
代码示例来源:origin: com.github.tntim96/rhino
String msg = lookupMessage("msg.too.deep.parser.recursion");
if (!compilerEnv.isIdeMode())
throw Context.reportRuntimeError(msg, sourceURI,
msg = lookupMessage("msg.got.syntax.errors", msg);
if (!compilerEnv.isIdeMode())
throw errorReporter.runtimeError(msg, sourceURI, baseLineno,
代码示例来源:origin: io.apigee/rhino
String msg = lookupMessage("msg.too.deep.parser.recursion");
if (!compilerEnv.isIdeMode())
throw Context.reportRuntimeError(msg, sourceURI,
msg = lookupMessage("msg.got.syntax.errors", msg);
if (!compilerEnv.isIdeMode())
throw errorReporter.runtimeError(msg, sourceURI, baseLineno,
代码示例来源:origin: ro.isdc.wro4j/rhino
String msg = lookupMessage("msg.too.deep.parser.recursion");
if (!compilerEnv.isIdeMode())
throw Context.reportRuntimeError(msg, sourceURI,
msg = lookupMessage("msg.got.syntax.errors", msg);
if (!compilerEnv.isIdeMode())
throw errorReporter.runtimeError(msg, sourceURI, baseLineno,
代码示例来源:origin: geogebra/geogebra
String msg = lookupMessage("msg.too.deep.parser.recursion");
if (!compilerEnv.isIdeMode())
throw Context.reportRuntimeError(msg, sourceURI,
msg = lookupMessage("msg.got.syntax.errors", msg);
if (!compilerEnv.isIdeMode())
throw errorReporter.runtimeError(msg, sourceURI, baseLineno,
内容来源于网络,如有侵权,请联系作者删除!