Commit Graph

7 Commits

Author SHA1 Message Date
Peter Janak de8a370e02 Fixing jsdoc parsing of functions that are defined over multiple lines (Fixes #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 https://github.com/facebook/react-native/pull/360
Github Author: Peter Janak <pjanak@nhl.com>

Test Plan: Run the website
2015-04-04 09:56:16 -08:00
Christopher Chedeau e1ef0328d9 [ReactNative] Expanded license on js files 2015-03-23 13:17:54 -08:00
Basil Hosmer d6bb48d972 more UIExplorer flow 2015-03-23 11:21:08 -08:00
Basil Hosmer 45a7b5cdcb UIExplorer flowification 2015-03-23 00:24:47 -08:00
Spencer Ahrens 9086365faf [ReactNative] Strip prefixes from NativeModules keys 2015-03-17 21:54:27 -08:00
Spencer Ahrens d8ee4e87a1 [ReactKit] Remove NativeModulesDeprecated 2015-03-17 02:48:58 -08:00
Eric Vicenti 85bcbd4bf3 [ReactNative] AlertIOS.alert and examples 2015-03-13 17:34:13 -08:00