Permalink
Browse files

JavaScript parser: create class tag for variable with children methods

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 bf233bc05590acf2c4ac6ecdbca9f9a30b5e5662
Showing with 3 additions and 1 deletion.
  1. +3 −1 tagmanager/ctags/js.c
View
@@ -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

0 comments on commit bf233bc

Please sign in to comment.