]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoUpdate link to api rustdocs
memoryruins [Mon, 14 Oct 2019 16:16:38 +0000 (12:16 -0400)]
Update link to api rustdocs

4 years agoMerge #2008
bors[bot] [Mon, 14 Oct 2019 13:26:42 +0000 (13:26 +0000)]
Merge #2008

2008: Prepare SourceDatabase API for lazy file loading r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoPrepare SourceDatabase API for lazy file loading
Aleksey Kladov [Mon, 14 Oct 2019 13:20:55 +0000 (16:20 +0300)]
Prepare SourceDatabase API for lazy file loading

4 years agoMerge #2006
bors[bot] [Mon, 14 Oct 2019 13:14:18 +0000 (13:14 +0000)]
Merge #2006

2006: Improvements around `Arc<[T]>` r=matklad a=sinkuu

First commit tries to avoid cloning `Arc<[T]>` to a temporary `Vec` for mutating it, if there are no other strong references. Second commit utilizes [`FromIterator for Arc<[T]>`](https://doc.rust-lang.org/std/sync/struct.Arc.html#impl-FromIterator%3CT%3E) instead of `.collect::<Vec<_>>().into()` to avoid allocation in `From<Vec<T>> for Arc<[T]>`.

Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
4 years agoMerge #2007
bors[bot] [Mon, 14 Oct 2019 12:22:54 +0000 (12:22 +0000)]
Merge #2007

2007: remove one more dependency on source roots r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoremove one more dependency on source roots
Aleksey Kladov [Mon, 14 Oct 2019 12:15:47 +0000 (15:15 +0300)]
remove one more dependency on source roots

4 years agoMerge #2002
bors[bot] [Mon, 14 Oct 2019 11:10:20 +0000 (11:10 +0000)]
Merge #2002

2002:  Remove unused dependencies r=matklad a=sinkuu

Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
4 years agoUpdate Cargo.lock
Shotaro Yamada [Mon, 14 Oct 2019 10:58:38 +0000 (19:58 +0900)]
Update Cargo.lock

4 years agoEnable `serde` feature in ra_syntax/Cargo.toml
Shotaro Yamada [Mon, 14 Oct 2019 10:56:29 +0000 (19:56 +0900)]
Enable `serde` feature in ra_syntax/Cargo.toml

4 years agomake_mut_slice
Shotaro Yamada [Mon, 14 Oct 2019 10:50:12 +0000 (19:50 +0900)]
make_mut_slice

4 years agoMerge #1999
bors[bot] [Mon, 14 Oct 2019 09:44:04 +0000 (09:44 +0000)]
Merge #1999

1999: Simplify find().is_some() to any() r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoMerge #2000
bors[bot] [Mon, 14 Oct 2019 09:34:29 +0000 (09:34 +0000)]
Merge #2000

2000: Use correct db type r=matklad a=kjeremy

I think this is more correct. No test fallouts.

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoimport make_mut_arc_slice
Shotaro Yamada [Mon, 14 Oct 2019 08:21:38 +0000 (17:21 +0900)]
import make_mut_arc_slice

4 years ago`.collect()` directly into `Arc<[T]>`
Shotaro Yamada [Mon, 14 Oct 2019 04:06:05 +0000 (13:06 +0900)]
`.collect()` directly into `Arc<[T]>`

4 years agoAvoid cloning `Arc<[T]>` into a vec if possible
Shotaro Yamada [Mon, 14 Oct 2019 03:56:18 +0000 (12:56 +0900)]
Avoid cloning `Arc<[T]>` into a vec if possible

4 years agoMerge #2005
bors[bot] [Sat, 12 Oct 2019 19:08:27 +0000 (19:08 +0000)]
Merge #2005

2005: add syntax-tree based indents r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoadd syntax-tree based indents
Aleksey Kladov [Sat, 12 Oct 2019 19:07:47 +0000 (22:07 +0300)]
add syntax-tree based indents

4 years agoMerge #2004
bors[bot] [Sat, 12 Oct 2019 16:41:47 +0000 (16:41 +0000)]
Merge #2004

2004: Split up infer.rs further r=flodiebold a=flodiebold

 - coercion logic goes to `coerce.rs`
 - expression inference goes to `expr.rs`
 - pattern inference goes to `pat.rs`

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoSplit up infer.rs further
Florian Diebold [Sat, 12 Oct 2019 15:39:20 +0000 (17:39 +0200)]
Split up infer.rs further

 - coercion logic goes to `coerce.rs`
 - expression inference goes to `expr.rs`
 - pattern inference goes to `pat.rs`

4 years agoRemove unused dependencies
Shotaro Yamada [Fri, 11 Oct 2019 23:00:54 +0000 (08:00 +0900)]
Remove unused dependencies

4 years agoRemove smol_str dependency from ra_syntax
Shotaro Yamada [Fri, 11 Oct 2019 22:48:23 +0000 (07:48 +0900)]
Remove smol_str dependency from ra_syntax

4 years agoUse correct db type
kjeremy [Fri, 11 Oct 2019 19:56:17 +0000 (15:56 -0400)]
Use correct db type

4 years agouse any()
kjeremy [Fri, 11 Oct 2019 19:55:45 +0000 (15:55 -0400)]
use any()

4 years agoMerge #1989
bors[bot] [Fri, 11 Oct 2019 11:12:27 +0000 (11:12 +0000)]
Merge #1989

1989: Chalk update to simplified IR r=flodiebold a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoMerge #1996
bors[bot] [Fri, 11 Oct 2019 08:50:16 +0000 (08:50 +0000)]
Merge #1996

1996: reduce visibility r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoreduce visibility
Aleksey Kladov [Fri, 11 Oct 2019 08:37:54 +0000 (11:37 +0300)]
reduce visibility

4 years agoMerge #1995
bors[bot] [Fri, 11 Oct 2019 08:08:21 +0000 (08:08 +0000)]
Merge #1995

1995: save disk space r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agosave disk space
Aleksey Kladov [Fri, 11 Oct 2019 08:06:28 +0000 (11:06 +0300)]
save disk space

4 years agoMerge #1994
bors[bot] [Fri, 11 Oct 2019 07:49:39 +0000 (07:49 +0000)]
Merge #1994

1994: remove last traces of source roots from hir r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoremove last traces of source roots from hir
Aleksey Kladov [Wed, 9 Oct 2019 11:27:37 +0000 (14:27 +0300)]
remove last traces of source roots from hir

4 years agoMerge #1991
bors[bot] [Fri, 11 Oct 2019 06:01:58 +0000 (06:01 +0000)]
Merge #1991

1991: Use `original_file` instead of `as_original_file` r=matklad a=sinkuu

I saw ra_lsp_server panics originating from `as_original_file`, though I have not been able to reproduce.

Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
4 years agoRemove `as_original_file`
Shotaro Yamada [Thu, 10 Oct 2019 21:53:31 +0000 (06:53 +0900)]
Remove `as_original_file`

4 years agoUse `original_file` instead of `as_original_file`
Shotaro Yamada [Thu, 10 Oct 2019 21:50:53 +0000 (06:50 +0900)]
Use `original_file` instead of `as_original_file`

4 years agoMerge #1988
bors[bot] [Thu, 10 Oct 2019 18:51:57 +0000 (18:51 +0000)]
Merge #1988

1988: Update all crates that do not introduce new dependencies r=matklad a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoChalk update to simplified IR
kjeremy [Thu, 10 Oct 2019 18:51:50 +0000 (14:51 -0400)]
Chalk update to simplified IR

4 years agoUpdate all crates that do not pull in new dependencies
kjeremy [Thu, 10 Oct 2019 18:10:24 +0000 (14:10 -0400)]
Update all crates that do not pull in new dependencies

4 years agoMerge #1981
bors[bot] [Thu, 10 Oct 2019 15:15:46 +0000 (15:15 +0000)]
Merge #1981

1981: tweak fn labels in completion r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agotweak fn labels in completion
Aleksey Kladov [Thu, 10 Oct 2019 13:37:56 +0000 (16:37 +0300)]
tweak fn labels in completion

4 years agoMerge #1986
bors[bot] [Thu, 10 Oct 2019 15:05:42 +0000 (15:05 +0000)]
Merge #1986

1986: don't special case module attrs r=matklad a=matklad

bors r+

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agodon't special case macro_use
Aleksey Kladov [Thu, 10 Oct 2019 14:48:30 +0000 (17:48 +0300)]
don't special case macro_use

4 years agodon't special case path attr
Aleksey Kladov [Thu, 10 Oct 2019 14:42:29 +0000 (17:42 +0300)]
don't special case path attr

4 years agoMerge #1985
bors[bot] [Thu, 10 Oct 2019 14:34:05 +0000 (14:34 +0000)]
Merge #1985

1985: simplify a bit r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMerge #1984
bors[bot] [Thu, 10 Oct 2019 14:23:21 +0000 (14:23 +0000)]
Merge #1984

1984: Bump rollup and vsce r=matklad a=kjeremy

I got sick of the vsce warning on install and noticed that rollup was also out of date.

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agosimplify a bit
Aleksey Kladov [Thu, 10 Oct 2019 14:16:02 +0000 (17:16 +0300)]
simplify a bit

4 years agoBump rollup and vsce
kjeremy [Thu, 10 Oct 2019 14:19:05 +0000 (10:19 -0400)]
Bump rollup and vsce

4 years agoMerge #1983
bors[bot] [Thu, 10 Oct 2019 14:13:01 +0000 (14:13 +0000)]
Merge #1983

1983: engine.vscode and @types/vscode should match r=matklad a=kjeremy

Per https://code.visualstudio.com/api/working-with-extensions/testing-extension

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoengine.vscode and @types/vscode should match
kjeremy [Thu, 10 Oct 2019 14:10:50 +0000 (10:10 -0400)]
engine.vscode and @types/vscode should match

4 years agoMerge #1979
bors[bot] [Thu, 10 Oct 2019 11:51:56 +0000 (11:51 +0000)]
Merge #1979

1979: Refactor and fix some more edge cases around name resolution r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agosimplify some tests
Aleksey Kladov [Thu, 10 Oct 2019 11:51:35 +0000 (14:51 +0300)]
simplify some tests

4 years agoRefactor and fix some more edge cases around name resolution
Aleksey Kladov [Thu, 10 Oct 2019 11:45:05 +0000 (14:45 +0300)]
Refactor and fix some more edge cases around name resolution

4 years agoMerge #1978
bors[bot] [Thu, 10 Oct 2019 10:19:11 +0000 (10:19 +0000)]
Merge #1978

1978: if completion does auto-insertion, indicate this in the label r=matklad a=matklad

bors try

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoif completion does auto-insertion, indicate this in the label
Aleksey Kladov [Thu, 10 Oct 2019 10:03:20 +0000 (13:03 +0300)]
if completion does auto-insertion, indicate this in the label

4 years agoMerge #1976
bors[bot] [Wed, 9 Oct 2019 13:17:55 +0000 (13:17 +0000)]
Merge #1976

1976: Add `module` methods r=matklad a=viorina

Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
4 years agoadd `module` methods
Ekaterina Babshukova [Wed, 9 Oct 2019 11:59:47 +0000 (14:59 +0300)]
add `module` methods

4 years agoMerge #1975
bors[bot] [Wed, 9 Oct 2019 11:49:16 +0000 (11:49 +0000)]
Merge #1975

1975: :arrow_up: smol_str, take 2 r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years ago:arrow_up: smol_str, take 2
Aleksey Kladov [Wed, 9 Oct 2019 11:48:50 +0000 (14:48 +0300)]
:arrow_up: smol_str, take 2

4 years agoMerge #1974
bors[bot] [Wed, 9 Oct 2019 11:28:56 +0000 (11:28 +0000)]
Merge #1974

1974: :arrow_up: smol_str r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years ago:arrow_up: smol_str
Aleksey Kladov [Wed, 9 Oct 2019 11:28:27 +0000 (14:28 +0300)]
:arrow_up: smol_str

4 years agoMerge #1973
bors[bot] [Wed, 9 Oct 2019 08:54:00 +0000 (08:54 +0000)]
Merge #1973

1973: add <> for type aliases as well r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoadd <> for type aliases as well
Aleksey Kladov [Wed, 9 Oct 2019 08:53:32 +0000 (11:53 +0300)]
add <> for type aliases as well

4 years agosmal cleanup
Aleksey Kladov [Wed, 9 Oct 2019 08:22:17 +0000 (11:22 +0300)]
smal cleanup

4 years agoMerge #1972
bors[bot] [Wed, 9 Oct 2019 08:26:31 +0000 (08:26 +0000)]
Merge #1972

1972: extend selection correctly handles commas in tuples r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoextend selection correctly handles commas in tuples
Aleksey Kladov [Wed, 9 Oct 2019 08:26:09 +0000 (11:26 +0300)]
extend selection correctly handles commas in tuples

4 years agoMerge #1970
bors[bot] [Wed, 9 Oct 2019 08:16:18 +0000 (08:16 +0000)]
Merge #1970

1970: Add <> when completing generics r=matklad a=matklad

@flodiebold wdyt? Is it correct that we always need to add `<>` in generic types?

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoadd `<>` when completing generic types
Aleksey Kladov [Tue, 8 Oct 2019 18:14:52 +0000 (21:14 +0300)]
add `<>` when completing generic types

4 years agosimplify
Aleksey Kladov [Tue, 8 Oct 2019 17:34:30 +0000 (20:34 +0300)]
simplify

4 years agorefactor
Aleksey Kladov [Tue, 8 Oct 2019 17:33:43 +0000 (20:33 +0300)]
refactor

4 years agorefactor
Aleksey Kladov [Tue, 8 Oct 2019 17:32:19 +0000 (20:32 +0300)]
refactor

4 years agoMerge #1969
bors[bot] [Tue, 8 Oct 2019 11:55:27 +0000 (11:55 +0000)]
Merge #1969

1969: restore coloring of attributes r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agorestore coloring of attributes
Aleksey Kladov [Tue, 8 Oct 2019 11:52:03 +0000 (14:52 +0300)]
restore coloring of attributes

4 years agoMerge #1924
bors[bot] [Tue, 8 Oct 2019 11:46:14 +0000 (11:46 +0000)]
Merge #1924

1924: Support inferring&completing `Self` type in enum/struct/union definitions r=ice1000 a=ice1000

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
An attempt to fix #1908.
This code works, but I believe the implementation is ugly. Please give me suggestions!

Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
4 years agohard-code nightly-only CFGs
Aleksey Kladov [Tue, 8 Oct 2019 11:43:29 +0000 (14:43 +0300)]
hard-code nightly-only CFGs

4 years agomacro DSL for cfg in tests
Aleksey Kladov [Tue, 8 Oct 2019 11:39:44 +0000 (14:39 +0300)]
macro DSL for cfg in tests

4 years agoAddress comments: fix docs, add completion test for `Self`.
ice1000 [Tue, 8 Oct 2019 11:25:37 +0000 (07:25 -0400)]
Address comments: fix docs, add completion test for `Self`.

4 years agouse slightly more idiomatic api for cfg
Aleksey Kladov [Tue, 8 Oct 2019 11:22:49 +0000 (14:22 +0300)]
use slightly more idiomatic api for cfg

4 years agoMerge #1922
bors[bot] [Tue, 8 Oct 2019 09:52:22 +0000 (09:52 +0000)]
Merge #1922

1922: feat(assists): Make raw string unescaped r=matklad a=Geobert

Last piece of https://github.com/rust-analyzer/rust-analyzer/issues/1730

Co-authored-by: Geobert Quach <geobert@protonmail.com>
4 years agoMerge #1951
bors[bot] [Tue, 8 Oct 2019 08:44:26 +0000 (08:44 +0000)]
Merge #1951

1951: Lower the precedence of the `as` operator. r=matklad a=goffrie

Previously, the `as` operator was being parsed like a postfix expression, and
therefore being given the highest possible precedence. That caused it to bind
more tightly than prefix operators, which it should not. Instead, parse it
somewhat like a normal binary expression with some special-casing.

Fixes #1851.

Co-authored-by: Geoffry Song <goffrie@gmail.com>
4 years agoMerge #1966
bors[bot] [Tue, 8 Oct 2019 06:35:52 +0000 (06:35 +0000)]
Merge #1966

1966: use lockfile in cargo install r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agouse lockfile in cargo install
Aleksey Kladov [Tue, 8 Oct 2019 06:35:27 +0000 (09:35 +0300)]
use lockfile in cargo install

4 years agoSupport inferring `Self` type in enum definitions
ice1000 [Fri, 27 Sep 2019 04:19:52 +0000 (00:19 -0400)]
Support inferring `Self` type in enum definitions

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
4 years agoMerge #1963
bors[bot] [Mon, 7 Oct 2019 13:43:43 +0000 (13:43 +0000)]
Merge #1963

1963: proc-macro2 1.0.5 r=matklad a=kjeremy

Has performance improvements. See https://github.com/alexcrichton/proc-macro2/issues/198

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoproc-macro2 1.0.5
Jeremy Kolb [Mon, 7 Oct 2019 13:35:08 +0000 (09:35 -0400)]
proc-macro2 1.0.5

4 years agoMove tests around
Geoffry Song [Sat, 5 Oct 2019 23:30:10 +0000 (16:30 -0700)]
Move tests around

4 years agoMerge #1960
bors[bot] [Sat, 5 Oct 2019 14:54:25 +0000 (14:54 +0000)]
Merge #1960

1960: Replace AST visitors with macro r=viorina a=viorina

Fixes #1672.

Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
4 years agoremove `visitor` module
Ekaterina Babshukova [Sat, 5 Oct 2019 14:48:31 +0000 (17:48 +0300)]
remove `visitor` module

4 years agoMerge #1928
bors[bot] [Sat, 5 Oct 2019 14:25:59 +0000 (14:25 +0000)]
Merge #1928

1928: Support `#[cfg(..)]` r=matklad a=oxalica

This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled.
Front-end settings are **not** included in this PR.

There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949

Fixes #1920

Related: #1073

Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
4 years agoreplace AST visitors with macro
Ekaterina Babshukova [Sat, 5 Oct 2019 14:03:03 +0000 (17:03 +0300)]
replace AST visitors with macro

4 years agoUse raw cfgs in json project and fix typo
oxalica [Sat, 5 Oct 2019 12:55:27 +0000 (20:55 +0800)]
Use raw cfgs in json project and fix typo

4 years agoMerge #1952
bors[bot] [Sat, 5 Oct 2019 09:09:38 +0000 (09:09 +0000)]
Merge #1952

1952: Create an assist for applying De Morgan's Law r=matklad a=cronokirby

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.

Co-authored-by: Lúcás Meier <cronokirby@gmail.com>
4 years agoMerge #1957
bors[bot] [Fri, 4 Oct 2019 21:51:44 +0000 (21:51 +0000)]
Merge #1957

1957: Add alternative setup instruction for vim/neovim r=matklad a=Luke-Nukem

Provide another option hint for vim/neovim users who do not want to run nodejs

Co-authored-by: Luke Jones <luke@ljones.dev>
4 years agoMerge #1956
bors[bot] [Fri, 4 Oct 2019 21:41:59 +0000 (21:41 +0000)]
Merge #1956

1956: don't keep history for gh-pages r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAdd alternative setup instruction for vim/neovim
Luke Jones [Fri, 4 Oct 2019 21:36:30 +0000 (10:36 +1300)]
Add alternative setup instruction for vim/neovim

Provide another option hint for vim/neovim users who do not want to run nodejs

4 years agodon't keep history for gh-pages
Aleksey Kladov [Fri, 4 Oct 2019 21:40:35 +0000 (00:40 +0300)]
don't keep history for gh-pages

docs weigh a lot, and change a lot. Keeping their changes in history
inflates repo size. By specifying `keep-history: false` we should be
able to avoid that.

4 years agofeat(assists): Address some PR comments
Geobert Quach [Fri, 4 Oct 2019 17:32:14 +0000 (18:32 +0100)]
feat(assists): Address some PR comments

4 years agoFix typo about De Morgan's law assist
Lúcás Meier [Fri, 4 Oct 2019 10:45:22 +0000 (12:45 +0200)]
Fix typo about De Morgan's law assist

4 years ago[#1807] Add entry in docs/user/features
Lúcás Meier [Fri, 4 Oct 2019 09:03:35 +0000 (11:03 +0200)]
[#1807] Add entry in docs/user/features

4 years ago[#1807] Refactor file structure
Lúcás Meier [Fri, 4 Oct 2019 08:51:41 +0000 (10:51 +0200)]
[#1807] Refactor file structure

Use the more conventional way of importing the ast types, and
put the assist at the top of the file.

4 years agoFix formatting
Lúcás Meier [Fri, 4 Oct 2019 06:21:24 +0000 (08:21 +0200)]
Fix formatting

4 years agoCreate an assist for applying De Morgan's law
Lúcás Meier [Thu, 3 Oct 2019 20:48:35 +0000 (22:48 +0200)]
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.

4 years agoWIP: Add demorgan application with naive negation
Lúcás Meier [Thu, 3 Oct 2019 20:19:46 +0000 (22:19 +0200)]
WIP: Add demorgan application with naive negation