本文整理了Java中org.mozilla.javascript.Parser.setRequiresActivation()
方法的一些代码示例,展示了Parser.setRequiresActivation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.setRequiresActivation()
方法的具体详情如下:
包路径:org.mozilla.javascript.Parser
类名称:Parser
方法名:setRequiresActivation
暂无
代码示例来源:origin: geogebra/geogebra
private void checkCallRequiresActivation(AstNode pn) {
if ((pn.getType() == Token.NAME
&& "eval".equals(((Name)pn).getIdentifier()))
|| (pn.getType() == Token.GETPROP &&
"eval".equals(((PropertyGet)pn).getProperty().getIdentifier())))
setRequiresActivation();
}
代码示例来源:origin: io.apigee/rhino
private void checkCallRequiresActivation(AstNode pn) {
if ((pn.getType() == Token.NAME
&& "eval".equals(((Name)pn).getIdentifier()))
|| (pn.getType() == Token.GETPROP &&
"eval".equals(((PropertyGet)pn).getProperty().getIdentifier())))
setRequiresActivation();
}
代码示例来源:origin: ro.isdc.wro4j/rhino
private void checkCallRequiresActivation(AstNode pn) {
if ((pn.getType() == Token.NAME
&& "eval".equals(((Name)pn).getIdentifier()))
|| (pn.getType() == Token.GETPROP &&
"eval".equals(((PropertyGet)pn).getProperty().getIdentifier())))
setRequiresActivation();
}
代码示例来源:origin: com.github.tntim96/rhino
private void checkCallRequiresActivation(AstNode pn) {
if ((pn.getType() == Token.NAME
&& "eval".equals(((Name)pn).getIdentifier()))
|| (pn.getType() == Token.GETPROP &&
"eval".equals(((PropertyGet)pn).getProperty().getIdentifier())))
setRequiresActivation();
}
代码示例来源:origin: geogebra/geogebra
protected void checkActivationName(String name, int token) {
if (!insideFunction()) {
return;
}
boolean activation = false;
if ("arguments".equals(name)
|| (compilerEnv.getActivationNames() != null
&& compilerEnv.getActivationNames().contains(name)))
{
activation = true;
} else if ("length".equals(name)) {
if (token == Token.GETPROP
&& compilerEnv.getLanguageVersion() == Context.VERSION_1_2)
{
// Use of "length" in 1.2 requires an activation object.
activation = true;
}
}
if (activation) {
setRequiresActivation();
}
}
代码示例来源:origin: ro.isdc.wro4j/rhino
protected void checkActivationName(String name, int token) {
if (!insideFunction()) {
return;
}
boolean activation = false;
if ("arguments".equals(name)
|| (compilerEnv.getActivationNames() != null
&& compilerEnv.getActivationNames().contains(name)))
{
activation = true;
} else if ("length".equals(name)) {
if (token == Token.GETPROP
&& compilerEnv.getLanguageVersion() == Context.VERSION_1_2)
{
// Use of "length" in 1.2 requires an activation object.
activation = true;
}
}
if (activation) {
setRequiresActivation();
}
}
代码示例来源:origin: io.apigee/rhino
protected void checkActivationName(String name, int token) {
if (!insideFunction()) {
return;
}
boolean activation = false;
if ("arguments".equals(name)
|| (compilerEnv.getActivationNames() != null
&& compilerEnv.getActivationNames().contains(name)))
{
activation = true;
} else if ("length".equals(name)) {
if (token == Token.GETPROP
&& compilerEnv.getLanguageVersion() == Context.VERSION_1_2)
{
// Use of "length" in 1.2 requires an activation object.
activation = true;
}
}
if (activation) {
setRequiresActivation();
}
}
代码示例来源:origin: com.github.tntim96/rhino
protected void checkActivationName(String name, int token) {
if (!insideFunction()) {
return;
}
boolean activation = false;
if ("arguments".equals(name)
|| (compilerEnv.getActivationNames() != null
&& compilerEnv.getActivationNames().contains(name)))
{
activation = true;
} else if ("length".equals(name)) {
if (token == Token.GETPROP
&& compilerEnv.getLanguageVersion() == Context.VERSION_1_2)
{
// Use of "length" in 1.2 requires an activation object.
activation = true;
}
}
if (activation) {
setRequiresActivation();
}
}
代码示例来源:origin: geogebra/geogebra
private AstNode defaultXmlNamespace()
throws IOException
{
if (currentToken != Token.DEFAULT) codeBug();
consumeToken();
mustHaveXML();
setRequiresActivation();
int lineno = ts.lineno, pos = ts.tokenBeg;
if (!(matchToken(Token.NAME) && "xml".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!(matchToken(Token.NAME) && "namespace".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!matchToken(Token.ASSIGN)) {
reportError("msg.bad.namespace");
}
AstNode e = expr();
UnaryExpression dxmln = new UnaryExpression(pos, getNodeEnd(e) - pos);
dxmln.setOperator(Token.DEFAULTNAMESPACE);
dxmln.setOperand(e);
dxmln.setLineno(lineno);
ExpressionStatement es = new ExpressionStatement(dxmln, true);
return es;
}
代码示例来源:origin: com.github.tntim96/rhino
private AstNode defaultXmlNamespace()
throws IOException
{
if (currentToken != Token.DEFAULT) codeBug();
consumeToken();
mustHaveXML();
setRequiresActivation();
int lineno = ts.lineno, pos = ts.tokenBeg;
if (!(matchToken(Token.NAME) && "xml".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!(matchToken(Token.NAME) && "namespace".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!matchToken(Token.ASSIGN)) {
reportError("msg.bad.namespace");
}
AstNode e = expr();
UnaryExpression dxmln = new UnaryExpression(pos, getNodeEnd(e) - pos);
dxmln.setOperator(Token.DEFAULTNAMESPACE);
dxmln.setOperand(e);
dxmln.setLineno(lineno);
ExpressionStatement es = new ExpressionStatement(dxmln, true);
return es;
}
代码示例来源:origin: io.apigee/rhino
private AstNode defaultXmlNamespace()
throws IOException
{
if (currentToken != Token.DEFAULT) codeBug();
consumeToken();
mustHaveXML();
setRequiresActivation();
int lineno = ts.lineno, pos = ts.tokenBeg;
if (!(matchToken(Token.NAME) && "xml".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!(matchToken(Token.NAME) && "namespace".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!matchToken(Token.ASSIGN)) {
reportError("msg.bad.namespace");
}
AstNode e = expr();
UnaryExpression dxmln = new UnaryExpression(pos, getNodeEnd(e) - pos);
dxmln.setOperator(Token.DEFAULTNAMESPACE);
dxmln.setOperand(e);
dxmln.setLineno(lineno);
ExpressionStatement es = new ExpressionStatement(dxmln, true);
return es;
}
代码示例来源:origin: ro.isdc.wro4j/rhino
private AstNode defaultXmlNamespace()
throws IOException
{
if (currentToken != Token.DEFAULT) codeBug();
consumeToken();
mustHaveXML();
setRequiresActivation();
int lineno = ts.lineno, pos = ts.tokenBeg;
if (!(matchToken(Token.NAME) && "xml".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!(matchToken(Token.NAME) && "namespace".equals(ts.getString()))) {
reportError("msg.bad.namespace");
}
if (!matchToken(Token.ASSIGN)) {
reportError("msg.bad.namespace");
}
AstNode e = expr();
UnaryExpression dxmln = new UnaryExpression(pos, getNodeEnd(e) - pos);
dxmln.setOperator(Token.DEFAULTNAMESPACE);
dxmln.setOperand(e);
dxmln.setLineno(lineno);
ExpressionStatement es = new ExpressionStatement(dxmln, true);
return es;
}
代码示例来源:origin: ro.isdc.wro4j/rhino
endFlags |= Node.END_YIELDS;
ret = new Yield(pos, end - pos, e);
setRequiresActivation();
setIsGenerator();
if (!exprContext) {
代码示例来源:origin: geogebra/geogebra
endFlags |= Node.END_YIELDS;
ret = new Yield(pos, end - pos, e);
setRequiresActivation();
setIsGenerator();
if (!exprContext) {
代码示例来源:origin: io.apigee/rhino
endFlags |= Node.END_YIELDS;
ret = new Yield(pos, end - pos, e);
setRequiresActivation();
setIsGenerator();
if (!exprContext) {
代码示例来源:origin: com.github.tntim96/rhino
endFlags |= Node.END_YIELDS;
ret = new Yield(pos, end - pos, e);
setRequiresActivation();
setIsGenerator();
if (!exprContext) {
代码示例来源:origin: geogebra/geogebra
lineno = ts.lineno;
mustHaveXML();
setRequiresActivation();
AstNode filter = expr();
int end = getNodeEnd(filter);
代码示例来源:origin: com.github.tntim96/rhino
lineno = ts.lineno;
mustHaveXML();
setRequiresActivation();
AstNode filter = expr();
int end = getNodeEnd(filter);
代码示例来源:origin: io.apigee/rhino
lineno = ts.lineno;
mustHaveXML();
setRequiresActivation();
AstNode filter = expr();
int end = getNodeEnd(filter);
代码示例来源:origin: ro.isdc.wro4j/rhino
lineno = ts.lineno;
mustHaveXML();
setRequiresActivation();
AstNode filter = expr();
int end = getNodeEnd(filter);
内容来源于网络,如有侵权,请联系作者删除!