diff options
author | Lúcás Meier <[email protected]> | 2019-10-03 21:48:35 +0100 |
---|---|---|
committer | Lúcás Meier <[email protected]> | 2019-10-03 21:48:35 +0100 |
commit | e769a54502648011ede7d7434e0a16a8ab740c56 (patch) | |
tree | f7a1c297c34a21eec9308de960df9063a6f5c878 /crates/ra_ide_api/src/snapshots | |
parent | ad65ba40624a0f9d0ecbfbfc2671e20cb98db029 (diff) |
Create an assist for applying De Morgan's law
Fixes #1807
This assist can transform expressions of the form `!x || !y` into
`!(x && y)`. This also works with `&&`.
This assist will only trigger if the cursor is on the central logical
operator.
The main limitation of this current implementation is that both operands
need to be an explicit negation, either of the form `!x`, or `x != y`.
More operands could be accepted, but this would complicate the implementation
quite a bit.
Diffstat (limited to 'crates/ra_ide_api/src/snapshots')
0 files changed, 0 insertions, 0 deletions