INRIA / INRIA/spoon

feature: add support for signaling that an expression can be wrapped into a method call

Open
#2,863 5 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
2k
Forks
392
Avg merge
11h 24m
Merged PRs (30d)
36

Description

(from @oscarlvp)

`x = i` can be transformed into `x=f(i)`.
`i++` cannot be transformed into `f(i)++`.

In CtUnaryOperator, `getOperand()` has a generic role `EXPRESSION` and getRole() cannot be used for checking that an expression can be wrapped into a method call

The solution is not obvious.

* changing the role of `getOperand()` from EXPRESSION to ASSIGNED. But this does not work for all CtUnaryOperator
* adding a method in CtUnaryOperator which only consider the assignent-style unary operators.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.