当前位置: 首页>>代码示例>>Java>>正文


Java Token.CALL属性代码示例

本文整理汇总了Java中org.mozilla.javascript.Token.CALL属性的典型用法代码示例。如果您正苦于以下问题:Java Token.CALL属性的具体用法?Java Token.CALL怎么用?Java Token.CALL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.mozilla.javascript.Token的用法示例。


在下文中一共展示了Token.CALL属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

@Override
public boolean visit(AstNode node) {
	if( Token.NAME == node.getType()){
		if(node.getParent().getType() == Token.CALL){
			FunctionCall parent = (FunctionCall)node.getParent();
			if(parent.getTarget()==node){
				resultSoFar.add(safeGetString(node));
			}
		}
	}
	return true;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:12,代码来源:FormulaInfo.java

示例2: processChild

/**
 * process child node
 * 
 * @param parent
 * @param child
 * @param tree
 * @param columnExprList
 * @throws BirtException
 */
private void processChild( Node child, ScriptNode tree,
		List columnExprList ) throws BirtException
{
	switch ( child.getType( ) )
	{
		case Token.NUMBER :
		case Token.STRING :
		case Token.NULL :
		case Token.TRUE :
		case Token.FALSE :
			break;

		case Token.GETPROP :
		case Token.GETELEM :
		case Token.SETPROP :
		case Token.SETELEM :
		{
			compileDirectColRefExpr( child, tree, columnExprList );
			break;
		}
		case Token.CALL :
			compileAggregateExpr( child, tree, columnExprList );
			break;
		default :
			compileComplexExpr( child, tree, columnExprList );
	}

}
 
开发者ID:eclipse,项目名称:birt,代码行数:37,代码来源:ExpressionParserUtility.java

示例3: hasSideEffects

@Override
public boolean hasSideEffects()
{
    switch (getType()) {
      case Token.ASSIGN:
      case Token.ASSIGN_ADD:
      case Token.ASSIGN_BITAND:
      case Token.ASSIGN_BITOR:
      case Token.ASSIGN_BITXOR:
      case Token.ASSIGN_DIV:
      case Token.ASSIGN_LSH:
      case Token.ASSIGN_MOD:
      case Token.ASSIGN_MUL:
      case Token.ASSIGN_RSH:
      case Token.ASSIGN_SUB:
      case Token.ASSIGN_URSH:
      case Token.BLOCK:
      case Token.BREAK:
      case Token.CALL:
      case Token.CATCH:
      case Token.CATCH_SCOPE:
      case Token.CONST:
      case Token.CONTINUE:
      case Token.DEC:
      case Token.DELPROP:
      case Token.DEL_REF:
      case Token.DO:
      case Token.ELSE:
      case Token.ENTERWITH:
      case Token.ERROR:         // Avoid cascaded error messages
      case Token.EXPORT:
      case Token.EXPR_RESULT:
      case Token.FINALLY:
      case Token.FUNCTION:
      case Token.FOR:
      case Token.GOTO:
      case Token.IF:
      case Token.IFEQ:
      case Token.IFNE:
      case Token.IMPORT:
      case Token.INC:
      case Token.JSR:
      case Token.LABEL:
      case Token.LEAVEWITH:
      case Token.LET:
      case Token.LETEXPR:
      case Token.LOCAL_BLOCK:
      case Token.LOOP:
      case Token.NEW:
      case Token.REF_CALL:
      case Token.RETHROW:
      case Token.RETURN:
      case Token.RETURN_RESULT:
      case Token.SEMI:
      case Token.SETELEM:
      case Token.SETELEM_OP:
      case Token.SETNAME:
      case Token.SETPROP:
      case Token.SETPROP_OP:
      case Token.SETVAR:
      case Token.SET_REF:
      case Token.SET_REF_OP:
      case Token.SWITCH:
      case Token.TARGET:
      case Token.THROW:
      case Token.TRY:
      case Token.VAR:
      case Token.WHILE:
      case Token.WITH:
      case Token.WITHEXPR:
      case Token.YIELD:
        return true;

      default:
        return false;
    }
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:77,代码来源:AstNode.java

示例4: hasSideEffects

public boolean hasSideEffects()
{
    switch (getType()) {
      case Token.ASSIGN:
      case Token.ASSIGN_ADD:
      case Token.ASSIGN_BITAND:
      case Token.ASSIGN_BITOR:
      case Token.ASSIGN_BITXOR:
      case Token.ASSIGN_DIV:
      case Token.ASSIGN_LSH:
      case Token.ASSIGN_MOD:
      case Token.ASSIGN_MUL:
      case Token.ASSIGN_RSH:
      case Token.ASSIGN_SUB:
      case Token.ASSIGN_URSH:
      case Token.BLOCK:
      case Token.BREAK:
      case Token.CALL:
      case Token.CATCH:
      case Token.CATCH_SCOPE:
      case Token.CONST:
      case Token.CONTINUE:
      case Token.DEC:
      case Token.DELPROP:
      case Token.DEL_REF:
      case Token.DO:
      case Token.ELSE:
      case Token.ENTERWITH:
      case Token.ERROR:         // Avoid cascaded error messages
      case Token.EXPORT:
      case Token.EXPR_RESULT:
      case Token.FINALLY:
      case Token.FUNCTION:
      case Token.FOR:
      case Token.GOTO:
      case Token.IF:
      case Token.IFEQ:
      case Token.IFNE:
      case Token.IMPORT:
      case Token.INC:
      case Token.JSR:
      case Token.LABEL:
      case Token.LEAVEWITH:
      case Token.LET:
      case Token.LETEXPR:
      case Token.LOCAL_BLOCK:
      case Token.LOOP:
      case Token.NEW:
      case Token.REF_CALL:
      case Token.RETHROW:
      case Token.RETURN:
      case Token.RETURN_RESULT:
      case Token.SEMI:
      case Token.SETELEM:
      case Token.SETELEM_OP:
      case Token.SETNAME:
      case Token.SETPROP:
      case Token.SETPROP_OP:
      case Token.SETVAR:
      case Token.SET_REF:
      case Token.SET_REF_OP:
      case Token.SWITCH:
      case Token.TARGET:
      case Token.THROW:
      case Token.TRY:
      case Token.VAR:
      case Token.WHILE:
      case Token.WITH:
      case Token.WITHEXPR:
      case Token.YIELD:
        return true;

      default:
        return false;
    }
}
 
开发者ID:middle2tw,项目名称:whackpad,代码行数:76,代码来源:AstNode.java

示例5: hasSideEffects

@Override
public boolean hasSideEffects()
  {
      switch (getType()) {
        case Token.ASSIGN:
        case Token.ASSIGN_ADD:
        case Token.ASSIGN_BITAND:
        case Token.ASSIGN_BITOR:
        case Token.ASSIGN_BITXOR:
        case Token.ASSIGN_DIV:
        case Token.ASSIGN_LSH:
        case Token.ASSIGN_MOD:
        case Token.ASSIGN_MUL:
        case Token.ASSIGN_RSH:
        case Token.ASSIGN_SUB:
        case Token.ASSIGN_URSH:
        case Token.BLOCK:
        case Token.BREAK:
        case Token.CALL:
        case Token.CATCH:
        case Token.CATCH_SCOPE:
        case Token.CONST:
        case Token.CONTINUE:
        case Token.DEC:
        case Token.DELPROP:
        case Token.DEL_REF:
        case Token.DO:
        case Token.ELSE:
        case Token.ENTERWITH:
        case Token.ERROR:         // Avoid cascaded error messages
        case Token.EXPORT:
        case Token.EXPR_RESULT:
        case Token.FINALLY:
        case Token.FUNCTION:
        case Token.FOR:
        case Token.GOTO:
        case Token.IF:
        case Token.IFEQ:
        case Token.IFNE:
        case Token.IMPORT:
        case Token.INC:
        case Token.JSR:
        case Token.LABEL:
        case Token.LEAVEWITH:
        case Token.LET:
        case Token.LETEXPR:
        case Token.LOCAL_BLOCK:
        case Token.LOOP:
        case Token.NEW:
        case Token.REF_CALL:
        case Token.RETHROW:
        case Token.RETURN:
        case Token.RETURN_RESULT:
        case Token.SEMI:
        case Token.SETELEM:
        case Token.SETELEM_OP:
        case Token.SETNAME:
        case Token.SETPROP:
        case Token.SETPROP_OP:
        case Token.SETVAR:
        case Token.SET_REF:
        case Token.SET_REF_OP:
        case Token.SWITCH:
        case Token.TARGET:
        case Token.THROW:
        case Token.TRY:
        case Token.VAR:
        case Token.WHILE:
        case Token.WITH:
        case Token.WITHEXPR:
        case Token.YIELD:
          return true;

        default:
          return false;
      }
  }
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:77,代码来源:AstNode.java

示例6: findFeaturePathsUnder

protected static Set<String> findFeaturePathsUnder(Node node, List<String> pathSoFar) {
	Set<String> resultSoFar = new TreeSet<String>();
	switch (node.getType()) {
	case Token.NAME: // e.g. the x in x + 42
		if (pathSoFar != null) {
			pathSoFar.add(node.getString());
		} else {
			resultSoFar.add(node.getString());
		}
		break;
	case Token.STRING:
		if (pathSoFar != null) {
			pathSoFar.add(node.getString());
		}
		break;
	case Token.GETPROP: // e.g. foo.bar
		boolean topLevel = pathSoFar == null;
		if (topLevel) {
			pathSoFar = new ArrayList<String>();
		}
		for (Node child = node.getFirstChild(); child != null; child = child.getNext()) {
			resultSoFar.addAll(findFeaturePathsUnder(child, pathSoFar));
		}
		if (topLevel) {
			resultSoFar.add(getPathString(pathSoFar));
		}
		return resultSoFar;
	case Token.SETNAME: // Left-hand variable being written:  x in x = y;
	case Token.VAR:
	case Token.CALL:
		// ignore the left side and process the right side now
		resultSoFar.addAll(findFeaturePathsWithinRightSide(node));
		break;
	default:
		break;
	}
	// Now do the nested subexpressions, for all cases that said break instead of return.
	for (Node child = node.getFirstChild(); child != null; child = child.getNext()) {
		resultSoFar.addAll(findFeaturePathsUnder(child, pathSoFar));
	}
	return resultSoFar;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:42,代码来源:FormulaInfo.java

示例7: processChild

/**
	 * 
	 * returns the compiled expression from processing a child node
	 * 
	 * @param context
	 * @param customerChecked
	 * @param parent
	 * @param child
	 * @return
	 * @throws DataException
	 */
protected CompiledExpression processChild( Context context,
		boolean customerChecked, Node parent, Node child, Node grandFather )
		throws DataException
{
	CompiledExpression compiledExpr = null;
	switch ( child.getType( ) )
	{
		case Token.NUMBER :
			compiledExpr = new ConstantExpression( child.getDouble( ) );
			break;

		case Token.STRING :
			compiledExpr = new ConstantExpression( child.getString( ) );
			break;

		case Token.NULL :
			compiledExpr = new ConstantExpression( );
			break;

		case Token.TRUE :
			compiledExpr = new ConstantExpression( true );
			break;

		case Token.FALSE :
			compiledExpr = new ConstantExpression( false );
			break;

		case Token.GETPROP :
		{
			ConstantExpression ce = AggregationConstantsUtil.getConstantExpression( child );
			if ( ce != null )
			{
				compiledExpr = ce;
				break;
			}
		}

		case Token.GETELEM :
			compiledExpr = compileDirectColRefExpr( parent,
					child,
					grandFather,
					customerChecked,
					context );
			break;

		case Token.CALL :
		{
			compiledExpr = compileAggregateExpr( context, parent, child );
			break;
		}
	}
	if ( compiledExpr == null )
		compiledExpr = compileComplexExpr( context, child, customerChecked );
	return compiledExpr;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:66,代码来源:AbstractExpressionCompiler.java


注:本文中的org.mozilla.javascript.Token.CALL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。