Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Functions inside nested anonymous functions don't display #8

Closed
kevinsawicki opened this issue Nov 6, 2013 · 4 comments
Closed

Functions inside nested anonymous functions don't display #8

kevinsawicki opened this issue Nov 6, 2013 · 4 comments
Labels

Comments

@kevinsawicki
Copy link
Contributor

Symbols view doesn't capture things like:

(function() {
  (function() {
    a = function() {}
  })
})
@PhilCoggins
Copy link
Contributor

Isn't this an issue with ctags' inability to recognize this as a symbol?

From @tangent405's example:

var winter = (function() {
console.log('winter');
});

var summer = function() {
console.log('summer');
};

When ctags generates the tags file, it gives me:

!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   1   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME  Exuberant Ctags //
!_TAG_PROGRAM_URL   http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.8 //
summer  seasons.js  /^var summer = function() {$/;" f

No mention of the winter function...

@yongkangchen
Copy link
Contributor

I suggest that user could use his own ctag langdef regex as I did for lua, which already support anonymous functions.

#35

@yongkangchen
Copy link
Contributor

@kevinsawicki
Copy link
Contributor Author

Thanks @yongkangchen for the link to those JS patterns 🌞

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants