public Assignment( NodeIndices parentNodeIndices, int statementIndex, int nodeIndex, string target, JSExpression newValue, JSOperator @operator, TypeReference targetType, TypeReference sourceType ) : base(parentNodeIndices, statementIndex, nodeIndex) { Target = target; NewValue = newValue; var newVariable = newValue as JSVariable; if (newVariable != null) { SourceVariable = newVariable.Identifier; } else { SourceVariable = null; } SourceType = sourceType; TargetType = targetType; Operator = @operator; IsConversion = !TypeUtil.TypesAreEqual(targetType, sourceType); }
public Assignment( int[] parentNodeIndices, int statementIndex, int nodeIndex, JSVariable target, JSExpression newValue, JSOperator @operator, TypeReference targetType, TypeReference sourceType ) : base(parentNodeIndices, statementIndex, nodeIndex) { Target = target; NewValue = newValue; SourceVariable = newValue as JSVariable; SourceType = sourceType; TargetType = targetType; Operator = @operator; IsConversion = !TypeUtil.TypesAreEqual(targetType, sourceType); }