Compact generic transforms
koczkatamas opened this issue · comments
Tamás Koczka commented
Add an option to describe the transformation in the following form:
- input: $object[$elementExpr] = $newValue
output: $object.set($elementExpr, $newValue)
which will do the same as now this:
- description: "$object[$elementExpr] = $newValue -> $object.set($elementExpr, $newValue)"
input:
exprKind: Binary
operator: =
left:
exprKind: ElementAccess
object: $object
elementExpr: $elementExpr
right: $newValue
output:
exprKind: Call
method:
exprKind: PropertyAccess
object: $object
propertyName: set
arguments: [$elementExpr, $newValue]