Commit graph

111 commits

Author SHA1 Message Date
Oleksandr T fcf7bafd57
fix(44812): add outlining spans for comments inside blocks (#44847) 2021-07-30 15:56:32 -07:00
Wesley Wigham fcabb5c0cc
Simplify or optimize regexes with polynomial time worst cases (#44197)
* Simplify or optimize regexes with polynomial time worst cases

* PR feedback & cleanup

Co-authored-by: David Michon <dmichon-msft@users.noreply.github.com>

* Use builtin scanner function for checking whitespace in fallback method (its faster)

Co-authored-by: David Michon <dmichon-msft@users.noreply.github.com>
2021-05-24 15:28:52 -07:00
Oleksandr T db01e84700
feat(eslint): consistent-type-assertions (#43556) 2021-05-18 06:20:57 -07:00
Alex T 0c7d45a9ed
fix: change deprecated FunctionLike type to SignatureDeclaration (#40795) 2020-10-06 07:51:01 -07:00
Alexander T fa5e9807e8
fix(40010): add outlining for comments before variables statements (#40016) 2020-08-27 16:29:05 -07:00
kingwl 3b8ad5c870 Add outlining spans for call expression or arrow body 2020-06-17 20:50:19 +08:00
Alexander T c00aeb5486
fix(33286): add outlining for arrow function with one parameter (#38631) 2020-05-21 08:07:47 -07:00
Alexander T 2b703d254a fix(33233): add outlining for comments before property access expression 2020-05-18 15:26:46 +03:00
Nathan Shively-Sanders 3f06adf662
Merge pull request #38240 from a-tarasyuk/feat/add-outlining-spans-for-object-destructuring-elements
feat: Add outlining spans for object destructuring elements
2020-05-12 07:35:03 -07:00
Alexander T d86bdf4e5c
add outlining spans for the tuple type (#38179) 2020-05-05 09:48:33 -07:00
Alexander T 2bdc8fdc94
add outlining spans for array destructuring elements (#38191) 2020-05-05 09:29:24 -07:00
Alexander T ef72e84314 Merge branch 'master' of https://github.com/microsoft/TypeScript into feat/add-outlining-spans-for-object-destructuring-elements 2020-04-28 17:15:25 +03:00
Alexander T 92a63741a2
fix(38080): add outlining spans for TypeLiteral (#38089) 2020-04-22 11:51:36 -04:00
Alexander T 52d32e5597 Add outlining spans for object destructuring elements 2020-04-21 12:57:52 +03:00
Andrew Branch db44231e38
Add outlining spans for case clauses (#37374)
* Add outlining spans for case clauses

* Update old test

* Update other test

* Update yet another of the same test
2020-03-13 10:52:27 -07:00
Orta 8a797cad2b
Adds floating block comments to the outlining spans response (#36880)
* Adds floating block comments to the outlining spans response

* Only use one route for grabbing outline nodes, which now includes special casing the EOF token
2020-02-25 17:09:16 -05:00
Orta 3ece65a94c
When looking at outlines for try functions, allow for not finding a child to provide a span when requesting outlines (#36389) 2020-01-27 15:59:49 -05:00
Titian Cernicova-Dragomir 82b0547281 Fixed outlining spans for chained method calls. (#35860) 2020-01-02 15:44:22 -08:00
Wenlu Wang 234680851b add template literal spans (#34699) 2019-10-30 23:54:00 -07:00
Jesse Trinity 599e36a068
Decrement line ends if they end with a carriage return. (#31220)
* Decrement line ends if they end with a carriage return.

* Changed handling of newlines and inlined regex operation.

* fixed misname of hintSpan

* added tests

* revert inline of regex match and use getLineEndOfPosition

* fixed lint error and changed a silly thing in tests
2019-07-25 21:29:12 -07:00
Sheetal Nandi 0038b0baa3
Merge pull request #31815 from gb714us/bug/31631
create outlining span for JsxFragment
2019-07-15 11:19:24 -07:00
Andrew Casey 65881602b6 Correct outline hint spans for functions 2019-06-11 16:58:08 -07:00
gb714us 7acca501b6 create outlining span for JsxFragment 2019-06-07 03:48:19 -07:00
Andy Hanson 6e4c150d6b When function parameters span multiple lines, make the function span start at the ( (#26907)
* When function parameters span multiple lines, make the function span start at the `(`

* Undo unnecessary change
2019-04-25 10:53:39 -07:00
Benjamin Lichtman 11585d29bc
Merge pull request #29218 from uniqueiniquity/jsdocSpanForVarStatement
Jsdoc span for var statement
2018-12-31 16:27:34 -08:00
Benjamin Lichtman 048d04684b use existing util functions 2018-12-31 15:56:54 -08:00
Benjamin Lichtman aebcb6df36
Merge pull request #29216 from uniqueiniquity/multilineArgumentSpans
Give appropriate outlining span for array and object literals as args in call expression
2018-12-31 15:18:07 -08:00
Benjamin Lichtman 34970d8a69 give jsdoc outline span before func exp assigned to var 2018-12-31 15:10:22 -08:00
Benjamin Lichtman 6c34520281 Use normal start for spans for args 2018-12-31 14:37:31 -08:00
Benjamin Lichtman b466336a3e Add class expression to set of nodes for outlining 2018-12-31 14:04:48 -08:00
Benjamin Lichtman 5c7b47e6e3 Pass sourceFile as appropriate 2018-07-09 08:54:57 -07:00
Benjamin Lichtman 6f68652f2a Only include attribute span if one or more 2018-06-29 17:12:05 -07:00
Benjamin Lichtman 3ca4c23e4c Add outlining regions for jsxelements and jsxattributes 2018-06-29 17:12:05 -07:00
Benjamin Lichtman ba8bc55907 Make regexp a constant 2018-06-29 11:51:56 -07:00
Benjamin Lichtman 699186083b Stop including region delimiter comments in comment fold regions 2018-06-29 11:34:58 -07:00
Mohamed Hegazy 64d6b24c87 Code review comments 2018-05-05 13:22:48 -07:00
Mohamed Hegazy 12ed49bada Revert adding named import binding list outlining spans 2018-05-05 12:04:12 -07:00
Mohamed Hegazy ea96638701 Fix indentation 2018-05-04 15:59:55 -07:00
Mohamed Hegazy 2d725feb51 Add outlining span for named bindings in import declarations 2018-05-04 11:26:03 -07:00
Mohamed Hegazy f1713c92d3 Add outlining spans for import declarations 2018-05-04 10:39:47 -07:00
Mohamed Hegazy e52efb04f3 Fix #22419: Add kind field to OutliningSpan 2018-05-03 16:28:55 -07:00
Andy d009d8efcf
Fix bug: IfStatement#elseStatement can be undefined (#23467) 2018-04-17 10:41:53 -07:00
Andy Hanson a60caba467 In outliningElementsCollector, treat 'else if' as having same depth as the 'if' 2018-04-16 11:33:30 -07:00
uniqueiniquity 6ba4dbeae4 Make region outlining more sensitive to CRLF 2018-03-23 14:29:32 -07:00
Andy 7c5a0ec9c6
Clean up outliningElementsCollector (#20143)
* Clean up outliningElementsCollector

* Use depthRemaining instead of maxDepth
2017-11-21 14:27:26 -05:00
Benjamin Lichtman 43084829bc Increase maximum depth of outlining span search (#18704)
* Increase max depth of outlining spans to 120

* Update tests

* Update tests to demonstrate limit

* Set limit to 40 and update tests
2017-10-04 13:48:08 -07:00
uniqueiniquity e5c43cddb7 Remove extra OutliningSpan and simplify regex 2017-09-15 16:47:59 -07:00
uniqueiniquity 484bd2082e Refactored out RegionRange 2017-09-15 16:15:32 -07:00
uniqueiniquity 3dfeb2d0f4 Combine and simplify regex 2017-09-15 15:52:08 -07:00
uniqueiniquity 7781245f1e Move RegionRange to private scope 2017-09-15 10:38:05 -07:00