Boo.Lang.Compiler.Steps.EmitAssembly.GetComplexExpressionValue C# (CSharp) Метод

GetComplexExpressionValue() приватный Метод

private GetComplexExpressionValue ( IType expectedType, Expression expression ) : object
expectedType IType
expression Boo.Lang.Compiler.Ast.Expression
Результат object
        private object GetComplexExpressionValue(IType expectedType, Expression expression)
        {
            IEntity tag = GetEntity(expression);
            if (EntityType.Type == tag.EntityType)
                return GetSystemType(expression);

            if (EntityType.Field == tag.EntityType)
            {
                IField field = (IField)tag;
                if (field.IsLiteral)
                {
                    //Scenario:
                    //IF:
                    //SomeType.StaticReference = "hamsandwich"
                    //[RandomAttribute(SomeType.StaticReferenece)]
                    //THEN:
                    //field.StaticValue != "hamsandwich"
                    //field.StaticValue == SomeType.StaticReference
                    //SO:
                    //If field.StaticValue is an AST Expression, call GetValue() on it
                    if (field.StaticValue is Expression)
                        return GetValue(expectedType, field.StaticValue as Expression);
                    return field.StaticValue;
                }
            }

            NotImplemented(expression, "Expression value: " + expression);
            return null;
        }
EmitAssembly