public override object VisitMemberDeclarationStatement([NotNull] ClepsParser.MemberDeclarationStatementContext context)
        {
            string    memberName = context.FieldName.Name.Text;
            bool      isStatic   = context.STATIC() != null;
            ClepsType memberType = Visit(context.typename()) as ClepsType;

            var oldMemberName     = CurrMemberName;
            var oldMemberIsStatic = CurrMemberIsStatic;
            var oldMemberType     = CurrMemberType;

            CurrMemberName     = memberName;
            CurrMemberIsStatic = isStatic;
            CurrMemberType     = memberType;

            if (context.rightHandExpression() != null)
            {
                Visit(context.rightHandExpression());
            }

            CurrMemberName     = oldMemberName;
            CurrMemberIsStatic = oldMemberIsStatic;
            CurrMemberType     = oldMemberType;

            return(true);
        }
        public override object VisitMemberDeclarationStatement([NotNull] ClepsParser.MemberDeclarationStatementContext context)
        {
            string memberName;

            if (context.OPERATOR() == null)
            {
                memberName = context.FieldName.Name.Text;
            }
            else
            {
                memberName = context.OperatorName.GetText();
            }

            bool      isStatic   = context.STATIC() != null;
            ClepsType memberType = Visit(context.typename()) as ClepsType;
            bool      isConst    = context.CONST() != null;

            //var oldMemberName = CurrMemberName;
            var oldMemberIsStatic = CurrMemberIsStatic;

            //var oldMemberType = CurrMemberType;

            //CurrMemberName = memberName;
            CurrMemberIsStatic = isStatic;
            //CurrMemberType = memberType;

            if (context.rightHandExpression() != null)
            {
                var expressionValue = Visit(context.rightHandExpression());

                //if(!memberType.IsFunctionType)
                {
                    IValue         expressionRegister = expressionValue as IValue;
                    IValueRegister targetRegister;
                    IMethodValue   initializerMethod;

                    if (isStatic)
                    {
                        initializerMethod = CodeGenerator.GetClassStaticInitializerRegister(FullyQualifiedClassName);
                        targetRegister    = CodeGenerator.GetStaticFieldRegister(FullyQualifiedClassName, memberName, memberType);
                    }
                    else
                    {
                        if (isConst)
                        {
                            initializerMethod = CodeGenerator.GetGlobalInitializerRegister();
                            targetRegister    = CodeGenerator.GetConstantMemberFieldRegisterForWrite(FullyQualifiedClassName, memberName, memberType);
                        }
                        else
                        {
                            initializerMethod = CodeGenerator.GetClassInitializerRegister(FullyQualifiedClassName);
                            targetRegister    = CodeGenerator.GetMemberFieldRegisterFromSameClass(FullyQualifiedClassName, memberName, memberType);
                        }
                    }

                    initializerMethod.CreateAssignment(targetRegister, expressionRegister);
                }
            }

            //CurrMemberName = oldMemberName;
            CurrMemberIsStatic = oldMemberIsStatic;
            //CurrMemberType = oldMemberType;

            return(true);
        }