ctags
ctags copied to clipboard
JavaScript: destructing in function signature
h.js:
const PackageList = ({packages}) => packages ? 1 : null;
output:
$ ~/bin/ctags --options=NONE --fields=+S --sort=no -o - /tmp/h.js
ctags: Notice: No options will be read from files or environment
packages /tmp/h.js /^const PackageList = ({packages}) => packages ? 1 : null;$/;" p function:PackageList
PackageList /tmp/h.js /^const PackageList = ({packages}) => packages ? 1 : null;$/;" f signature:()
signature: of PackageeList should be ({package}).
package should not be tagged till we add parameter kind to the parser.
To solve this issue, we need more flexible look-ahead mechanism that Cxx parser has. The input is too similar with with
const PackageList = ({packages})
We cannot say anything about ({packages}) till we see (or don't see) =>.