Skip to content

Compact generic transforms #25

Open

Description

@koczkatamas

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions