forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing jsdoc parsing of functions that are defined over multiple lines (
Fixes facebook#410) Summary: As it was implemented, the jsdoc parser would look only the first non-blank line immediately preceding a function declaration. However, the line that was set as the beginning of a function declaration was where the opening bracket (`{`) was. This is insufficient for functions whose definitions span multiple lines. For example, this declaration would not find the comments above it: ``` /** * Clones rows **/ cloneWithRows( dataBlob: Array<any> | {[key: string]: any}, rowIdentities: ?Array<string> ): ListViewDataSource { ... } ``` With this change, the parser will first check if we have a closing parenthesis. If we do and don't have a matching open parenthesis we continue moving up the lines until we find it. Then we set previous line to be the line before that, the true beginning of the function declaration. Closes facebook#360 Github Author: Peter Janak <pjanak@nhl.com> Test Plan: Run the website
- Loading branch information
Peter Janak
committed
Apr 4, 2015
1 parent
0bb6b2f
commit e239feb
Showing
2 changed files
with
93 additions
and
98 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