Skip to content

Commit

Permalink
JavaScript parser: create class tag for variable with children methods
Browse files Browse the repository at this point in the history
If we generated methods, properties or class children tags for a
variable, generate a class tag for the variable itself so the children
aren't orphaned.
  • Loading branch information
b4n committed Sep 25, 2012
1 parent 5df551b commit bf233bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tagmanager/ctags/js.c
Expand Up @@ -1387,7 +1387,9 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class)
* var z = {};
*/
has_methods = parseMethods(token, name);
if ( ! has_methods )
if (has_methods)
makeJsTag (name, JSTAG_CLASS);
else
{
/*
* Only create variables for global scope
Expand Down

0 comments on commit bf233bc

Please sign in to comment.