Package org.apache.flex.compiler.internal.as.codegen.ICodeGenerator

Examples of org.apache.flex.compiler.internal.as.codegen.ICodeGenerator.IConstantValue


       
        final ICompilerProject project = this.classScope.getProject();
       
        ICodeGenerator codeGenerator = classScope.getGenerator();
        IExpressionNode assignedValueNode = var.getAssignedValueNode();
        IConstantValue constantValue = codeGenerator.generateConstantValue(assignedValueNode, project);

        //  initializer is null if no constant value
        //  can be generated, and null is the correct value for "no value."
        Object initializer = constantValue != null ? constantValue.getValue() : null;
       
        // Reducing the constant value may have produced problems in the
        // LexicalScope used for constant reduction. Transfer them over
        // to the LexicalScope for this class.
        Collection<ICompilerProblem> problems = constantValue != null ? constantValue.getProblems() : null;
        if (problems != null)
            classScope.addProblems(problems);
       
        final MethodBodySemanticChecker checker = new MethodBodySemanticChecker(this.classScope);
       
View Full Code Here


        IExpressionNode initExpr = getInitExpression();
        if (initExpr != null)
        {
            ICodeGenerator codeGenerator = CodeGeneratorManager.getCodeGenerator();
            IConstantValue constantValue = codeGenerator.generateConstantValue(initExpr, project);
            if (constantValue != null)
                return constantValue.getValue();
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.as.codegen.ICodeGenerator.IConstantValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.