Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not finding functions #7

Open
rcrooks opened this issue May 26, 2013 · 6 comments
Open

Not finding functions #7

rcrooks opened this issue May 26, 2013 · 6 comments

Comments

@rcrooks
Copy link

rcrooks commented May 26, 2013

When I run annotate, I always get the alert "no functions found". I consistently use expressions (foo = function() {}) rather than function declarations. Is that the reason, or is something else going on?
Thanks,
Robert

@netgfx
Copy link

netgfx commented Nov 11, 2013

It also doesn't process public functions like this.fn = function(){}

Thanks.

@netgfx
Copy link

netgfx commented Nov 11, 2013

You can add the following code which solves the "this" issue:

else if(results[0] === "this" && results[2] === "function"){
            return {
                name: results[1],
                params: results.slice(3),
                prefix: getPrefix(txtFrom, results[0])
            };   
        }

@mbaez
Copy link
Contributor

mbaez commented Nov 21, 2013

I consistently use expressions like { functionName : function(){ ..} } but when I run annotate, I always get the alert "no functions found" .The following code solve the issue

else if (results[1] === "function") {
      return {
                name: results[0],
                params: results.slice(2),
                prefix: getPrefix(txtFrom, results[0])
     };
}

@Hopiu
Copy link

Hopiu commented Mar 27, 2014

Added with #25

@sasc1
Copy link

sasc1 commented Oct 9, 2014

it doesnt recognise functions with spaces between parameters eg:
"function exec(a, b, c)" is not found,
but "function exec(a,b,c)" is.
the regex needs to be modified.

@mbaez
Copy link
Contributor

mbaez commented Oct 11, 2014

Expressions like this :

var test = fucntion (c, d){ ..}

does not recognize

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

No branches or pull requests

5 participants