diff --git a/crates/ide/src/join_lines.rs b/crates/ide/src/join_lines.rs index 631bde0f19..e3f3985d14 100644 --- a/crates/ide/src/join_lines.rs +++ b/crates/ide/src/join_lines.rs @@ -270,27 +270,28 @@ fn foo() { #[test] fn test_join_lines_diverging_block() { - let before = r" - fn foo() { - loop { - match x { - 92 => $0{ - continue; - } - } - } + check_join_lines( + r" +fn foo() { + loop { + match x { + 92 => $0{ + continue; } - "; - let after = r" - fn foo() { - loop { - match x { - 92 => $0continue, - } - } - } - "; - check_join_lines(before, after); + } + } +} + ", + r" +fn foo() { + loop { + match x { + 92 => $0continue, + } + } +} + ", + ); } #[test] diff --git a/crates/ide/src/syntax_tree.rs b/crates/ide/src/syntax_tree.rs index 4c63d30236..f979ba4346 100644 --- a/crates/ide/src/syntax_tree.rs +++ b/crates/ide/src/syntax_tree.rs @@ -100,147 +100,137 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option", + "superType": "punctuation" + }, + { + "id": "comma", + "description": ",", + "superType": "punctuation" + }, + { + "id": "colon", + "description": ":", + "superType": "punctuation" + }, + { + "id": "semicolon", + "description": ";", + "superType": "punctuation" + }, + { + "id": "dot", + "description": ".", + "superType": "punctuation" } ], "semanticTokenModifiers": [