コード例 #1
0
        private void generateAssignInto(LValueProvider lValue)
        {
            if (_storage != null)
            {
                //value is already created, reassign it
                lValue.Assign(_storage, _newOperator);
                return;
            }

            var storageProvider = lValue as IStorageReadProvider;

            if (storageProvider == null)
            {
                var temporary = new TemporaryVariableValue(_objectType, Context);
                _storage = temporary.Storage;
                temporary.AssignNewObject(_objectType, _newOperator);
                lValue.Assign(_storage, _newOperator);
            }
            else
            {
                _storage = storageProvider.Storage;
                lValue.AssignNewObject(_objectType, _newOperator);
            }

            _ctorCall.Generate();

            if (_initializerArguments.Length > 0)
            {
                generateInitializer();
            }
        }
コード例 #2
0
 public override void Generate()
 {
     _castedValue.Generate();
 }