Commit graph

18 commits

Author SHA1 Message Date
Nathan Shively-Sanders fefb857847 Use only immediately preceding JSDoc
Now only the immediately preceding jsdoc of a node is retrieved by
getJSDoc, although it still does the correct non-local lookup for nodes
like ParameterDeclaration.

This doesn't change parsing or binding, which use the per-node Node.jsdoc
property directly. But it does change everything that relies on getJSDoc,
which includes the checker and language service.

Fixes #32062, which contains the analysis that justifies the change.
2019-06-29 08:05:10 -07:00
Andy c97fc64972
Always use verify.completions when testing completions (#28137) 2018-10-29 10:03:25 -07:00
Andy cc7bfc0349
Support testing jsdoc tags of completions (#26962) 2018-09-13 08:47:50 -07:00
Andy e411381266
Fix bug: Don't let empty signature documentation override other documentation (#26638) 2018-08-27 09:38:52 -07:00
Tim Schaub 960800d1fe Remove trailing whitespace from JSDoc comments 2018-07-28 10:36:10 -06:00
Nathan Shively-Sanders 03fff50fa4
Simplify getJSDocCommentAndTags (#24997)
Previously, getJSDocCommentAndTags could recur up to four times if any
of four predicates matched. However, to avoid duplicates, the predicates
have been tuned to be mutually exclusive, which means that the recursion
can be turned into a while loop. The while loop is much simpler and
safer, since it is guaranteed to only walk up the tree one time. In
addition, the extra check that adds jsdoc from initializers only runs
once, before the loop, further reducing the opportunity for duplicate
jsdocs.

I thought about further simplifying the code that gets the next node to
check, but to know when to stop the loop, I'd need a predicate that is
as complicated as the code in `getNextJSDocCommentLocation`, so I kept
the existing code, just reordering it for compactness.
2018-06-19 10:14:47 -07:00
Andy e1f22ac568
Combine signatureHelp testing methods (#24132) 2018-05-15 12:34:53 -07:00
Wesley Wigham 19ec83fcdf
Refactor declaration emitter into declaration transformer (#21930)
* Refactor declaration emitter into declaration transformer

* Slight cleanup from code review feedback

* Incorporate fix for new test

* Swaths of PR feedback

* Merge public methods

* Per-file output

* Preserve input import ordering more often

* Unify jsdoc comment start detection under more lenient rule

* Move to per-file transformations to reduce the memory that msut be retained

* Fix typo
2018-03-15 22:23:10 -07:00
Andy abb9681248 Support completions for JSDoc @param tag names (#16299)
* Support completions for JSDoc @param tag names

* Undo change to finishNode

* Don't include trailing whitespace in @param range; instead, specialize getJsDocTagAtPosition
2017-06-07 12:28:52 -07:00
Nathan Shively-Sanders f8f244f68a Merge branch 'master' into new-jsdoc-parser 2016-09-15 11:53:04 -07:00
Andy Hanson 956c582786 Simplify quick-info tests 2016-09-13 11:49:01 -07:00
Nathan Shively-Sanders f8e192afb0 Use a state enum to parse top-level jsdoc comments
Also use a `pushComments` function, which fixes a spacing bug.
2016-09-02 09:09:02 -07:00
Nathan Shively-Sanders 2b9624672d Update/add baselines for jsdoc/emitter changes 2016-09-01 09:26:44 -07:00
Cyrus Najmabadi eed6f0deca Use an output format for quickinfo that more closely matches the original source.
i.e. use  "var v: string" instead of "(var) v: string".

The parens case should only be used when we're using an english description instead of
an actual language construct.
2015-03-24 00:16:49 -07:00
Sheetal Nandi 0fbf73a02a Fixed the + overload according to feedback 2014-10-07 17:06:34 -07:00
Sheetal Nandi df423369f1 Overload formatting in the symbol displaying 2014-09-30 17:10:08 -07:00
Sheetal Nandi 743046bf45 Use SymbolDisplayParts api 2014-09-30 17:08:52 -07:00
Sheetal Nandi d1a09da676 Get the JSDoc comments for the symbols
This also fixed type formatting for single function signatures in the types
2014-09-30 17:06:04 -07:00
Renamed from tests/cases/fourslash_old/commentsCommentParsing.ts (Browse further)