From bf233bc05590acf2c4ac6ecdbca9f9a30b5e5662 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 25 Sep 2012 16:47:00 +0200 Subject: [PATCH] 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. --- tagmanager/ctags/js.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tagmanager/ctags/js.c b/tagmanager/ctags/js.c index bd3e8a1fa9..690d97f9bd 100644 --- a/tagmanager/ctags/js.c +++ b/tagmanager/ctags/js.c @@ -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