本文整理了Java中org.mozilla.javascript.Parser.reportError()
方法的一些代码示例,展示了Parser.reportError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.reportError()
方法的具体详情如下:
包路径:org.mozilla.javascript.Parser
类名称:Parser
方法名:reportError
暂无
代码示例来源:origin: io.apigee/rhino
void reportError(String messageId, String messageArg) {
if (ts == null) { // happens in some regression tests
reportError(messageId, messageArg, 1, 1);
} else {
reportError(messageId, messageArg, ts.tokenBeg,
ts.tokenEnd - ts.tokenBeg);
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
void reportError(String messageId, String messageArg) {
if (ts == null) { // happens in some regression tests
reportError(messageId, messageArg, 1, 1);
} else {
reportError(messageId, messageArg, ts.tokenBeg,
ts.tokenEnd - ts.tokenBeg);
}
}
代码示例来源:origin: rhino/js
private void checkMutableReference(Node n)
{
int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
parser.reportError("msg.bad.assign.left");
}
}
代码示例来源:origin: rhino/js
private void mustHaveXML()
{
if (!compilerEnv.isXmlAvailable()) {
reportError("msg.XML.not.available");
}
}
代码示例来源:origin: rhino/js
private void mustMatchToken(int toMatch, String messageId)
throws IOException, ParserException
{
if (!matchToken(toMatch)) {
reportError(messageId);
}
}
代码示例来源:origin: geogebra/geogebra
private boolean mustMatchToken(int toMatch, String msgId, int pos, int len)
throws IOException
{
if (matchToken(toMatch)) {
return true;
}
reportError(msgId, pos, len);
return false;
}
代码示例来源:origin: geogebra/geogebra
private void mustHaveXML() {
if (!compilerEnv.isXmlAvailable()) {
reportError("msg.XML.not.available");
}
}
代码示例来源:origin: geogebra/geogebra
protected void checkMutableReference(Node n) {
int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
reportError("msg.bad.assign.left");
}
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
private void mustMatchToken(int toMatch, String messageId)
throws IOException, ParserException
{
if (!matchToken(toMatch)) {
reportError(messageId);
}
}
代码示例来源:origin: io.apigee/rhino
private void mustHaveXML() {
if (!compilerEnv.isXmlAvailable()) {
reportError("msg.XML.not.available");
}
}
代码示例来源:origin: io.apigee/rhino
protected void checkMutableReference(Node n) {
int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
reportError("msg.bad.assign.left");
}
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
private void mustHaveXML()
{
if (!compilerEnv.isXmlAvailable()) {
reportError("msg.XML.not.available");
}
}
代码示例来源:origin: com.yahoo/yuicompressor
private void mustMatchToken(int toMatch, String messageId)
throws IOException, ParserException
{
if (!matchToken(toMatch)) {
reportError(messageId);
}
}
代码示例来源:origin: com.github.tntim96/rhino
private void mustHaveXML() {
if (!compilerEnv.isXmlAvailable()) {
reportError("msg.XML.not.available");
}
}
代码示例来源:origin: io.apigee/rhino
private boolean mustMatchToken(int toMatch, String msgId, int pos, int len)
throws IOException
{
if (matchToken(toMatch)) {
return true;
}
reportError(msgId, pos, len);
return false;
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
private void checkMutableReference(Node n)
{
int memberTypeFlags = n.getIntProp(Node.MEMBER_TYPE_PROP, 0);
if ((memberTypeFlags & Node.DESCENDANTS_FLAG) != 0) {
parser.reportError("msg.bad.assign.left");
}
}
代码示例来源:origin: com.yahoo/yuicompressor
private void mustHaveXML()
{
if (!compilerEnv.isXmlAvailable()) {
reportError("msg.XML.not.available");
}
}
代码示例来源:origin: geogebra/geogebra
private void checkBadIncDec(UnaryExpression expr) {
AstNode op = removeParens(expr.getOperand());
int tt = op.getType();
if (!(tt == Token.NAME
|| tt == Token.GETPROP
|| tt == Token.GETELEM
|| tt == Token.GET_REF
|| tt == Token.CALL))
reportError(expr.getType() == Token.INC
? "msg.bad.incr"
: "msg.bad.decr");
}
代码示例来源:origin: io.apigee/rhino
private void checkBadIncDec(UnaryExpression expr) {
AstNode op = removeParens(expr.getOperand());
int tt = op.getType();
if (!(tt == Token.NAME
|| tt == Token.GETPROP
|| tt == Token.GETELEM
|| tt == Token.GET_REF
|| tt == Token.CALL))
reportError(expr.getType() == Token.INC
? "msg.bad.incr"
: "msg.bad.decr");
}
代码示例来源:origin: rhino/js
Node createYield(Node child, int lineno)
{
if (!parser.insideFunction()) {
parser.reportError("msg.bad.yield");
}
setRequiresActivation();
setIsGenerator();
if (child != null)
return new Node(Token.YIELD, child, lineno);
else
return new Node(Token.YIELD, lineno);
}
内容来源于网络,如有侵权,请联系作者删除!