-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script side implementation for Brace Completion. (#7587)
* Script side implementation for Brace Completion. This needs updated Visual Studio components to work. * Changed CharacterCodes to number, to keep the API simple * CR feedback * CR feedback and more JSX tests * Swapped 2 comments * typo
- Loading branch information
1 parent
19a9f7f
commit 96deb55
Showing
12 changed files
with
267 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// /** | ||
//// * inside jsdoc /*1*/ | ||
//// */ | ||
//// function f() { | ||
//// // inside regular comment /*2*/ | ||
//// var c = ""; | ||
//// | ||
//// /* inside multi- | ||
//// line comment /*3*/ | ||
//// */ | ||
//// var y =12; | ||
//// } | ||
|
||
goTo.marker('1'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
|
||
goTo.marker('2'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
|
||
goTo.marker('3'); | ||
verify.not.isValidBraceCompletionAtPostion('('); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//@Filename: file.tsx | ||
//// declare var React: any; | ||
//// | ||
//// var x = <div a="/*2*/" b={/*3*/}> | ||
//// /*1*/ | ||
//// </div>; | ||
//// var y = <div>/*4*/</div> | ||
//// var z = <div> | ||
//// hello /*5*/ | ||
//// </div> | ||
//// var z2 = <div> { /*6*/ | ||
//// </div> | ||
//// var z3 = <div> | ||
//// { | ||
//// /*7*/ | ||
//// } | ||
//// </div> | ||
|
||
goTo.marker('1'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.isValidBraceCompletionAtPostion('{'); | ||
|
||
goTo.marker('2'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.not.isValidBraceCompletionAtPostion('{'); | ||
|
||
goTo.marker('3'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.isValidBraceCompletionAtPostion('{'); | ||
|
||
goTo.marker('4'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.isValidBraceCompletionAtPostion('{'); | ||
|
||
goTo.marker('5'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.isValidBraceCompletionAtPostion('{'); | ||
|
||
goTo.marker('6'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.isValidBraceCompletionAtPostion('{'); | ||
|
||
goTo.marker('7'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
verify.isValidBraceCompletionAtPostion('{'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// var x = "/*1*/"; | ||
//// var x = '/*2*/'; | ||
//// var x = "hello \ | ||
//// /*3*/"; | ||
|
||
goTo.marker('1'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
|
||
goTo.marker('2'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
|
||
goTo.marker('3'); | ||
verify.not.isValidBraceCompletionAtPostion('('); | ||
|
Oops, something went wrong.