本文整理汇总了Java中jdk.nashorn.internal.ir.VarNode.isFunctionDeclaration方法的典型用法代码示例。如果您正苦于以下问题:Java VarNode.isFunctionDeclaration方法的具体用法?Java VarNode.isFunctionDeclaration怎么用?Java VarNode.isFunctionDeclaration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.nashorn.internal.ir.VarNode
的用法示例。
在下文中一共展示了VarNode.isFunctionDeclaration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: enterVarNode
import jdk.nashorn.internal.ir.VarNode; //导入方法依赖的package包/类
@Override
public boolean enterVarNode(final VarNode varNode) {
start(varNode);
// Normally, a symbol assigned in a var statement is not live for its RHS. Since we also represent function
// declarations as VarNodes, they are exception to the rule, as they need to have the symbol visible to the
// body of the declared function for self-reference.
if (varNode.isFunctionDeclaration()) {
defineVarIdent(varNode);
}
return true;
}
示例2: leaveVarNode
import jdk.nashorn.internal.ir.VarNode; //导入方法依赖的package包/类
@Override
public Node leaveVarNode(final VarNode varNode) {
if (!varNode.isFunctionDeclaration()) {
defineVarIdent(varNode);
}
return super.leaveVarNode(varNode);
}
示例3: enterVarNode
import jdk.nashorn.internal.ir.VarNode; //导入方法依赖的package包/类
@Override
public boolean enterVarNode(final VarNode varNode) {
// Normally, a symbol assigned in a var statement is not live for its RHS. Since we also represent function
// declarations as VarNodes, they are exception to the rule, as they need to have the symbol visible to the
// body of the declared function for self-reference.
if (varNode.isFunctionDeclaration()) {
defineVarIdent(varNode);
}
return true;
}