aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-24 12:19:22 +0000
committerGitHub <[email protected]>2021-02-24 12:19:22 +0000
commit0537510aef4059d5f79146a8dc2734ffdb27dc74 (patch)
tree6fa29e24165e07db8f77dad76d633b12eb79574f /crates/syntax/src/ast
parent18ac02ba411e2f9eeb38c3b246c619ac76846767 (diff)
parent694f7a7e9f90cc435afcaade23b5908728d17ed2 (diff)
Merge #7719
7719: De Morgan's Law assist now correctly parenthesizes binary expressions. r=Veykril a=lbrande Closes #7694 by parenthesizing binary expressions that are negated. Co-authored-by: lbrande <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/syntax/src/ast')
-rw-r--r--crates/syntax/src/ast/make.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs
index 5eee33545..b6c5de658 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -527,8 +527,11 @@ pub mod tokens {
527 527
528 use crate::{ast, AstNode, Parse, SourceFile, SyntaxKind::*, SyntaxToken}; 528 use crate::{ast, AstNode, Parse, SourceFile, SyntaxKind::*, SyntaxToken};
529 529
530 pub(super) static SOURCE_FILE: Lazy<Parse<SourceFile>> = 530 pub(super) static SOURCE_FILE: Lazy<Parse<SourceFile>> = Lazy::new(|| {
531 Lazy::new(|| SourceFile::parse("const C: <()>::Item = (1 != 1, 2 == 2, !true, *p)\n;\n\n")); 531 SourceFile::parse(
532 "const C: <()>::Item = (1 != 1, 2 == 2, 3 < 3, 4 <= 4, 5 > 5, 6 >= 6, !true, *p)\n;\n\n",
533 )
534 });
532 535
533 pub fn single_space() -> SyntaxToken { 536 pub fn single_space() -> SyntaxToken {
534 SOURCE_FILE 537 SOURCE_FILE