1 --- ctags/jscript.c.orig 2008-10-13 00:27:38.000000000 +0200
2 +++ ctags/jscript.c 2014-09-30 13:49:34.837349283 +0200
5 - * $Id: jscript.c 666 2008-05-15 17:47:31Z dfishburn $
6 + * $Id: jscript.c 791 2012-10-24 01:13:13Z dfishburn $
8 * Copyright (c) 2003, Darren Hiebert
11 * Tag generation functions
15 static void makeConstTag (tokenInfo *const token, const jsKind kind)
17 if (JsKinds [kind].enabled && ! token->ignoreTag )
20 if (JsKinds [kind].enabled && ! token->ignoreTag )
24 * If a scope has been added to the token, change the token
25 * string to include the scope when making the tag.
28 if ( vStringLength(token->scope) > 0 )
31 fulltag = vStringNew ();
32 vStringCopy(fulltag, token->scope);
33 vStringCatS (fulltag, ".");
35 vStringTerminate(fulltag);
36 vStringCopy(token->string, fulltag);
37 vStringDelete (fulltag);
39 + jsKind parent_kind = JSTAG_CLASS;
42 + * if we're creating a function (and not a method),
43 + * guess we're inside another function
45 + if (kind == JSTAG_FUNCTION)
46 + parent_kind = JSTAG_FUNCTION;
48 + e.extensionFields.scope[0] = JsKinds [parent_kind].name;
49 + e.extensionFields.scope[1] = vStringValue (token->scope);
51 - makeConstTag (token, kind);
52 + * makeConstTag (token, kind); *
58 +static void makeJsTag (tokenInfo *const token, const jsKind kind)
60 + if (JsKinds [kind].enabled && ! token->ignoreTag )
62 + const char *const name = vStringValue (token->string);
64 + initTagEntry (&e, name);
66 + e.lineNumber = token->lineNumber;
67 + e.filePosition = token->filePosition;
68 + e.kindName = JsKinds [kind].name;
69 + e.kind = JsKinds [kind].letter;
71 + if ( vStringLength(token->scope) > 0 )
73 + jsKind parent_kind = JSTAG_CLASS;
76 + * If we're creating a function (and not a method),
77 + * guess we're inside another function
79 + if (kind == JSTAG_FUNCTION)
80 + parent_kind = JSTAG_FUNCTION;
82 + e.extensionFields.scope[0] = JsKinds [parent_kind].name;
83 + e.extensionFields.scope[1] = vStringValue (token->scope);