[geany/geany] f2b368: javascript: Report function signature
Colomban Wendling
git-noreply at xxxxx
Mon Nov 24 01:55:44 UTC 2014
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 24 Nov 2014 01:55:44 UTC
Commit: f2b368e2cc507f9b074ff12f412ea222d273bb84
https://github.com/geany/geany/commit/f2b368e2cc507f9b074ff12f412ea222d273bb84
Log Message:
-----------
javascript: Report function signature
Modified Paths:
--------------
tagmanager/ctags/js.c
tests/ctags/1795612.js.tags
tests/ctags/1850914.js.tags
tests/ctags/1878155.js.tags
tests/ctags/1880687.js.tags
tests/ctags/2023624.js.tags
tests/ctags/3470609.js.tags
tests/ctags/Makefile.am
tests/ctags/arraylist.js.tags
tests/ctags/bracematch.js.tags
tests/ctags/bug1950327.js.tags
tests/ctags/bug2888482.js.tags
tests/ctags/bug3036476.js.tags
tests/ctags/bug3571233.js.tags
tests/ctags/complex-return.js.tags
tests/ctags/js-class-related-unterminated.js.tags
tests/ctags/js-scope.js.tags
tests/ctags/js-signature.js
tests/ctags/js-signature.js.tags
tests/ctags/js-sub-block-scope.js.tags
tests/ctags/js-unknown-construct-nesting.js.tags
tests/ctags/jsFunc_tutorial.js.tags
tests/ctags/no_terminator.js.tags
tests/ctags/parenthesis-rvalue.js.tags
tests/ctags/regexp.js.tags
tests/ctags/secondary_fcn_name.js.tags
tests/ctags/shebang.js.tags
tests/ctags/simple.js.tags
tests/ctags/ui5.controller.js.tags
Modified: tagmanager/ctags/js.c
147 lines changed, 103 insertions(+), 44 deletions(-)
===================================================================
@@ -219,7 +219,7 @@ static void deleteToken (tokenInfo *const token)
* Tag generation functions
*/
-static void makeJsTag (tokenInfo *const token, const jsKind kind)
+static void makeJsTag (tokenInfo *const token, const jsKind kind, vString *const signature)
{
if (JsKinds [kind].enabled && ! token->ignoreTag )
{
@@ -256,14 +256,30 @@ static void makeJsTag (tokenInfo *const token, const jsKind kind)
e.extensionFields.scope[1] = vStringValue (fullscope);
}
- makeTagEntry (&e);
+ if (signature && vStringLength(signature))
+ {
+ size_t i;
+ /* sanitize signature by replacing all control characters with a
+ * space (because it's simple).
+ * there should never be any junk in a valid signature, but who
+ * knows what the user wrote and CTags doesn't cope well with weird
+ * characters. */
+ for (i = 0; i < signature->length; i++)
+ {
+ unsigned char c = (unsigned char) signature->buffer[i];
+ if (c < 0x20 /* below space */ || c == 0x7F /* DEL */)
+ signature->buffer[i] = ' ';
+ }
+ e.extensionFields.arglist = vStringValue(signature);
+ }
+ makeTagEntry (&e);
vStringDelete (fullscope);
}
}
-static void makeClassTag (tokenInfo *const token)
-{
+static void makeClassTag (tokenInfo *const token, vString *const signature)
+{
vString * fulltag;
if ( ! token->ignoreTag )
@@ -283,14 +299,14 @@ static void makeClassTag (tokenInfo *const token)
if ( ! stringListHas(ClassNames, vStringValue (fulltag)) )
{
stringListAdd (ClassNames, vStringNewCopy (fulltag));
- makeJsTag (token, JSTAG_CLASS);
+ makeJsTag (token, JSTAG_CLASS, signature);
}
vStringDelete (fulltag);
}
}
-static void makeFunctionTag (tokenInfo *const token)
-{
+static void makeFunctionTag (tokenInfo *const token, vString *const signature)
+{
vString * fulltag;
if ( ! token->ignoreTag )
@@ -310,7 +326,7 @@ static void makeFunctionTag (tokenInfo *const token)
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) )
{
stringListAdd (FunctionNames, vStringNewCopy (fulltag));
- makeJsTag (token, JSTAG_FUNCTION);
+ makeJsTag (token, JSTAG_FUNCTION, signature);
}
vStringDelete (fulltag);
}
@@ -390,8 +406,7 @@ static void parseIdentifier (vString *const string, const int firstChar)
c = fileGetc ();
} while (isIdentChar (c));
vStringTerminate (string);
- if (!isspace (c))
- fileUngetc (c); /* unget non-identifier character */
+ fileUngetc (c); /* unget non-identifier character */
}
static keywordId analyzeToken (vString *const name)
@@ -404,24 +419,34 @@ static keywordId analyzeToken (vString *const name)
return result;
}
-static void readToken (tokenInfo *const token)
+static void readTokenFull (tokenInfo *const token, vString *const repr)
{
int c;
+ int i;
token->type = TOKEN_UNDEFINED;
token->keyword = KEYWORD_NONE;
vStringClear (token->string);
getNextChar:
+ i = 0;
do
{
c = fileGetc ();
+ i++;
}
while (c == '\t' || c == ' ' || c == '\n');
token->lineNumber = getSourceLineNumber ();
token->filePosition = getInputFilePosition ();
+ if (repr)
+ {
+ if (i > 1)
+ vStringPut (repr, ' ');
+ vStringPut (repr, c);
+ }
+
switch (c)
{
case EOF: longjmp (Exception, (int)ExceptionEOF); break;
@@ -443,6 +468,11 @@ static void readToken (tokenInfo *const token)
parseString (token->string, c);
token->lineNumber = getSourceLineNumber ();
token->filePosition = getInputFilePosition ();
+ if (repr)
+ {
+ vStringCat (repr, token->string);
+ vStringPut (repr, c);
+ }
break;
case '\\':
@@ -482,6 +512,8 @@ static void readToken (tokenInfo *const token)
}
else
{
+ if (repr) /* remove the / we added */
+ repr->buffer[--repr->length] = 0;
if (d == '*')
{
do
@@ -533,6 +565,8 @@ static void readToken (tokenInfo *const token)
token->type = TOKEN_IDENTIFIER;
else
token->type = TOKEN_KEYWORD;
+ if (repr && vStringLength (token->string) > 1)
+ vStringCatS (repr, vStringValue (token->string) + 1);
}
break;
}
@@ -540,6 +574,11 @@ static void readToken (tokenInfo *const token)
LastTokenType = token->type;
}
+static void readToken (tokenInfo *const token)
+{
+ readTokenFull (token, NULL);
+}
+
static void copyToken (tokenInfo *const dest, tokenInfo *const src)
{
dest->nestLevel = src->nestLevel;
@@ -555,7 +594,7 @@ static void copyToken (tokenInfo *const dest, tokenInfo *const src)
* Token parsing functions
*/
-static void skipArgumentList (tokenInfo *const token)
+static void skipArgumentList (tokenInfo *const token, vString *const repr)
{
int nest_level = 0;
@@ -569,9 +608,11 @@ static void skipArgumentList (tokenInfo *const token)
if (isType (token, TOKEN_OPEN_PAREN)) /* arguments? */
{
nest_level++;
+ if (repr)
+ vStringPut (repr, '(');
while (! (isType (token, TOKEN_CLOSE_PAREN) && (nest_level == 0)))
{
- readToken (token);
+ readTokenFull (token, repr);
if (isType (token, TOKEN_OPEN_PAREN))
{
nest_level++;
@@ -661,7 +702,7 @@ static boolean findCmdTerm (tokenInfo *const token)
}
else if ( isType (token, TOKEN_OPEN_PAREN) )
{
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
}
else if ( isType (token, TOKEN_OPEN_SQUARE) )
{
@@ -698,7 +739,7 @@ static void parseSwitch (tokenInfo *const token)
* Handle nameless functions, these will only
* be considered methods.
*/
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
}
if (isType (token, TOKEN_OPEN_CURLY))
@@ -742,7 +783,7 @@ static boolean parseLoop (tokenInfo *const token, tokenInfo *const parent)
* Handle nameless functions, these will only
* be considered methods.
*/
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
}
if (isType (token, TOKEN_OPEN_CURLY))
@@ -792,7 +833,7 @@ static boolean parseLoop (tokenInfo *const token, tokenInfo *const parent)
* Handle nameless functions, these will only
* be considered methods.
*/
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
}
if (! isType (token, TOKEN_SEMICOLON))
is_terminated = FALSE;
@@ -861,7 +902,7 @@ static boolean parseIf (tokenInfo *const token, tokenInfo *const parent)
* Handle nameless functions, these will only
* be considered methods.
*/
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
}
if (isType (token, TOKEN_OPEN_CURLY))
@@ -886,6 +927,7 @@ static boolean parseIf (tokenInfo *const token, tokenInfo *const parent)
static void parseFunction (tokenInfo *const token)
{
tokenInfo *const name = newToken ();
+ vString *const signature = vStringNew ();
boolean is_class = FALSE;
/*
@@ -909,19 +951,20 @@ static void parseFunction (tokenInfo *const token)
}
if ( isType (token, TOKEN_OPEN_PAREN) )
- skipArgumentList(token);
+ skipArgumentList(token, signature);
if ( isType (token, TOKEN_OPEN_CURLY) )
{
is_class = parseBlock (token, name);
if ( is_class )
- makeClassTag (name);
+ makeClassTag (name, signature);
else
- makeFunctionTag (name);
+ makeFunctionTag (name, signature);
}
findCmdTerm (token);
+ vStringDelete (signature);
deleteToken (name);
}
@@ -1062,17 +1105,19 @@ static boolean parseMethods (tokenInfo *const token, tokenInfo *const class)
readToken (token);
if ( isKeyword (token, KEYWORD_function) )
{
+ vString *const signature = vStringNew ();
+
readToken (token);
if ( isType (token, TOKEN_OPEN_PAREN) )
{
- skipArgumentList(token);
+ skipArgumentList(token, signature);
}
if (isType (token, TOKEN_OPEN_CURLY))
{
has_methods = TRUE;
addToScope (name, class->string);
- makeJsTag (name, JSTAG_METHOD);
+ makeJsTag (name, JSTAG_METHOD, signature);
parseBlock (token, name);
/*
@@ -1081,6 +1126,8 @@ static boolean parseMethods (tokenInfo *const token, tokenInfo *const class)
*/
readToken (token);
}
+
+ vStringDelete (signature);
}
else
{
@@ -1101,7 +1148,7 @@ static boolean parseMethods (tokenInfo *const token, tokenInfo *const class)
}
else if (isType (token, TOKEN_OPEN_PAREN))
{
- skipArgumentList (token);
+ skipArgumentList (token, NULL);
}
else if (isType (token, TOKEN_OPEN_SQUARE))
{
@@ -1117,9 +1164,9 @@ static boolean parseMethods (tokenInfo *const token, tokenInfo *const class)
has_methods = TRUE;
addToScope (name, class->string);
if (has_child_methods)
- makeJsTag (name, JSTAG_CLASS);
+ makeJsTag (name, JSTAG_CLASS, NULL);
else
- makeJsTag (name, JSTAG_PROPERTY);
+ makeJsTag (name, JSTAG_PROPERTY, NULL);
}
}
}
@@ -1256,7 +1303,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
* }
*
*/
- makeClassTag (name);
+ makeClassTag (name, NULL);
is_class = TRUE;
/*
@@ -1271,9 +1318,10 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
readToken (token);
if ( isKeyword(token, KEYWORD_NONE) )
{
+ vString *const signature = vStringNew ();
+
vStringCopy(saveScope, token->scope);
addToScope(token, name->string);
- makeJsTag (token, JSTAG_METHOD);
readToken (method_body_token);
vStringCopy (method_body_token->scope, token->scope);
@@ -1283,11 +1331,15 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
isType (method_body_token, TOKEN_OPEN_CURLY)) )
{
if ( isType (method_body_token, TOKEN_OPEN_PAREN) )
- skipArgumentList(method_body_token);
+ skipArgumentList(method_body_token,
+ vStringLength (signature) == 0 ? signature : NULL);
else
readToken (method_body_token);
}
+ makeJsTag (token, JSTAG_METHOD, signature);
+ vStringDelete (signature);
+
if ( isType (method_body_token, TOKEN_OPEN_CURLY))
{
parseBlock (method_body_token, token);
@@ -1329,7 +1381,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
}
if ( isType (token, TOKEN_OPEN_PAREN) )
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
if ( isType (token, TOKEN_OPEN_SQUARE) )
skipArrayList(token);
@@ -1365,7 +1417,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
* var g_var2;
*/
if (isType (token, TOKEN_SEMICOLON))
- makeJsTag (name, JSTAG_VARIABLE);
+ makeJsTag (name, JSTAG_VARIABLE, NULL);
}
/*
* Statement has ended.
@@ -1390,6 +1442,8 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
if ( isKeyword (token, KEYWORD_function) )
{
+ vString *const signature = vStringNew ();
+
readToken (token);
if ( isKeyword (token, KEYWORD_NONE) &&
@@ -1417,7 +1471,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
}
if ( isType (token, TOKEN_OPEN_PAREN) )
- skipArgumentList(token);
+ skipArgumentList(token, signature);
if (isType (token, TOKEN_OPEN_CURLY))
{
@@ -1429,23 +1483,25 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
*/
if ( is_inside_class )
{
- makeJsTag (name, JSTAG_METHOD);
+ makeJsTag (name, JSTAG_METHOD, signature);
if ( vStringLength(secondary_name->string) > 0 )
- makeFunctionTag (secondary_name);
+ makeFunctionTag (secondary_name, signature);
parseBlock (token, name);
}
else
{
is_class = parseBlock (token, name);
if ( is_class )
- makeClassTag (name);
+ makeClassTag (name, signature);
else
- makeFunctionTag (name);
+ makeFunctionTag (name, signature);
if ( vStringLength(secondary_name->string) > 0 )
- makeFunctionTag (secondary_name);
+ makeFunctionTag (secondary_name, signature);
}
}
+
+ vStringDelete (signature);
}
else if (isType (token, TOKEN_OPEN_CURLY))
{
@@ -1460,7 +1516,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
*/
has_methods = parseMethods(token, name);
if (has_methods)
- makeJsTag (name, JSTAG_CLASS);
+ makeJsTag (name, JSTAG_CLASS, NULL);
else
{
/*
@@ -1496,7 +1552,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
! stringListHas(ClassNames, vStringValue (fulltag)) )
{
- makeJsTag (name, JSTAG_VARIABLE);
+ makeJsTag (name, JSTAG_VARIABLE, NULL);
}
vStringDelete (fulltag);
}
@@ -1524,7 +1580,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
readToken (token);
if ( isType (token, TOKEN_OPEN_PAREN) )
- skipArgumentList(token);
+ skipArgumentList(token, NULL);
if (isType (token, TOKEN_SEMICOLON))
{
@@ -1532,15 +1588,18 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
{
if ( is_var )
{
- makeJsTag (name, JSTAG_VARIABLE);
+ makeJsTag (name, JSTAG_VARIABLE, NULL);
}
else
{
if ( is_class )
{
- makeClassTag (name);
+ makeClassTag (name, NULL);
} else {
- makeFunctionTag (name);
+ /* FIXME: we cannot really get a meaningful
+ * signature from a `new Function()` call,
+ * so for now just don't set any */
+ makeFunctionTag (name, NULL);
}
}
}
@@ -1584,7 +1643,7 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
if ( ! stringListHas(FunctionNames, vStringValue (fulltag)) &&
! stringListHas(ClassNames, vStringValue (fulltag)) )
{
- makeJsTag (name, JSTAG_VARIABLE);
+ makeJsTag (name, JSTAG_VARIABLE, NULL);
}
vStringDelete (fulltag);
}
Modified: tests/ctags/1795612.js.tags
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1,5 +1,5 @@
# format=tagmanager
RPC�1�Test�0
-asyncMethod�128�Test.RPC�0
-asyncRequest�128�Test.RPC�0
+asyncMethod�128�( uri, method, params, callback)�Test.RPC�0
+asyncRequest�128�( uri, data, callback)�Test.RPC�0
request_id�64�Test.RPC�0
Modified: tests/ctags/1850914.js.tags
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1,4 +1,4 @@
# format=tagmanager
-objLiteralMethod�128�objectLiteral�0
+objLiteralMethod�128�()�objectLiteral�0
objLiteralProperty�64�objectLiteral�0
objectLiteral�1�0
Modified: tests/ctags/1878155.js.tags
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1,4 +1,4 @@
# format=tagmanager
RE�1�0
foo�16384�0
-my_function�16�0
+my_function�16�()�0
Modified: tests/ctags/1880687.js.tags
80 lines changed, 40 insertions(+), 40 deletions(-)
===================================================================
@@ -1,42 +1,42 @@
# format=tagmanager
MyClass�1�0
-MyClass_sub1�128�MyClass�0
-MyClass_sub2�128�MyClass�0
-a�16�0
-aa�16�0
-aa_sub1�16�aa�0
-aa_sub2�16�aa�0
-b�16�0
-baz�16�f�0
-c�16�0
-d�16�0
-e�16�0
-f�16�0
-g�16�0
-h�16�0
-i�16�0
-j�16�0
-k�16�0
-l�16�0
-m�16�0
-n�16�0
-o�16�0
-p�16�0
-q�16�0
-r�16�0
-s�16�0
-t�16�0
-u�16�0
-v�16�0
-w�16�0
-w_sub1�16�w�0
-w_sub2�16�w�0
-x�16�0
-x_sub1�16�x�0
-x_sub2�16�x�0
-y�16�0
-y_sub1�16�y�0
-y_sub2�16�y�0
-z�16�0
-z_sub1�16�z�0
-z_sub2�16�z�0
+MyClass_sub1�128�(x)�MyClass�0
+MyClass_sub2�128�(x)�MyClass�0
+a�16�(flag)�0
+aa�16�()�0
+aa_sub1�16�()�aa�0
+aa_sub2�16�()�aa�0
+b�16�()�0
+baz�16�()�f�0
+c�16�(flag)�0
+d�16�()�0
+e�16�(flag)�0
+f�16�()�0
+g�16�(flag)�0
+h�16�()�0
+i�16�(flag)�0
+j�16�()�0
+k�16�(flag)�0
+l�16�()�0
+m�16�(flag)�0
+n�16�()�0
+o�16�()�0
+p�16�()�0
+q�16�()�0
+r�16�(flag)�0
+s�16�()�0
+t�16�(flag)�0
+u�16�(flag)�0
+v�16�(flag)�0
+w�16�()�0
+w_sub1�16�(x)�w�0
+w_sub2�16�()�w�0
+x�16�()�0
+x_sub1�16�()�x�0
+x_sub2�16�()�x�0
+y�16�()�0
+y_sub1�16�()�y�0
+y_sub2�16�()�y�0
+z�16�()�0
+z_sub1�16�()�z�0
+z_sub2�16�()�z�0
Modified: tests/ctags/2023624.js.tags
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1,3 +1,3 @@
# format=tagmanager
-f1�16�0
-f2�16�0
+f1�16�()�0
+f2�16�()�0
Modified: tests/ctags/3470609.js.tags
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -1,13 +1,13 @@
# format=tagmanager
array�64�root�0
decimal�64�root�0
-f�16�0
+f�16�()�0
id�64�root�0
-method�128�root�0
+method�128�()�root�0
neg�64�root�0
parentheses�64�root�0
root�1�0
string�64�root�0
-subFunction�128�root.subObject�0
+subFunction�128�()�root.subObject�0
subObject�1�root�0
subProperty�64�root.subObject�0
Modified: tests/ctags/Makefile.am
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -161,6 +161,7 @@ test_sources = \
java_enum.java \
js-class-related-unterminated.js \
js-scope.js \
+ js-signature.js \
js-sub-block-scope.js \
js-unknown-construct-nesting.js \
jsFunc_tutorial.js \
Modified: tests/ctags/arraylist.js.tags
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -3,7 +3,7 @@ a
b�16384�0
bar�64�class.test1�0
c�16384�0
-class�1�0
+class�1�()�0
foo�64�class.test1�0
test1�1�class�0
-test3�128�class�0
+test3�128�()�class�0
Modified: tests/ctags/bracematch.js.tags
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -1,7 +1,7 @@
# format=tagmanager
-Container�16�0
+Container�16�()�0
MyClass�1�0
-insert�128�MyClass�0
-wrap�128�MyClass�0
-x�16�Container�0
-y�16�Container�0
+insert�128�(element, insertions)�MyClass�0
+wrap�128�(element, wrapper, attributes)�MyClass�0
+x�16�()�Container�0
+y�16�()�Container�0
Modified: tests/ctags/bug1950327.js.tags
12 lines changed, 6 insertions(+), 6 deletions(-)
===================================================================
@@ -2,13 +2,13 @@
*�64�container.dirtyTab�0
Different�1�0
TabChrome�1�0
-createTabTile�128�Different�0
-createTabTile�128�TabChrome�0
-destroyTabTile�128�Different�0
-destroyTabTile�128�TabChrome�0
+createTabTile�128�(browser)�Different�0
+createTabTile�128�(browser)�TabChrome�0
+destroyTabTile�128�(tile)�Different�0
+destroyTabTile�128�(tile)�TabChrome�0
dirtyTab�1�container�0
-init�128�Different�0
-init�128�TabChrome�0
+init�128�()�Different�0
+init�128�()�TabChrome�0
snapshot�64�container.dirtyTab�0
title�64�container.dirtyTab�0
url�64�container.dirtyTab�0
Modified: tests/ctags/bug2888482.js.tags
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1,3 +1,3 @@
# format=tagmanager
-onsubmit�16�editFormEl�0
-scrollEditBox�16�0
+onsubmit�16�()�editFormEl�0
+scrollEditBox�16�()�0
Modified: tests/ctags/bug3036476.js.tags
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -1,5 +1,5 @@
# format=tagmanager
container�16384�0
-method1�16�container.object�0
-method2�16�container.object�0
-object�16�container�0
+method1�16�()�container.object�0
+method2�16�()�container.object�0
+object�16�()�container�0
Modified: tests/ctags/bug3571233.js.tags
18 lines changed, 9 insertions(+), 9 deletions(-)
===================================================================
@@ -1,11 +1,11 @@
# format=tagmanager
MyClass�1�0
-MyClass�16�0
-function1�16�0
-function2�16�0
-method2�128�MyClass�0
-nestedFunction1�16�MyClass.method2�0
-nestedFunction2�16�MyClass.method2�0
-nestedFunction3�16�function1�0
-nestedFunction4�16�function2�0
-nestedFunction5�16�function2�0
+MyClass�16�()�0
+function1�16�()�0
+function2�16�()�0
+method2�128�()�MyClass�0
+nestedFunction1�16�()�MyClass.method2�0
+nestedFunction2�16�()�MyClass.method2�0
+nestedFunction3�16�()�function1�0
+nestedFunction4�16�()�function2�0
+nestedFunction5�16�()�function2�0
Modified: tests/ctags/complex-return.js.tags
34 lines changed, 17 insertions(+), 17 deletions(-)
===================================================================
@@ -1,18 +1,18 @@
# format=tagmanager
-c2m1�128�class2�0
-c2m2�128�class2�0
-c2m3�128�class2�0
-c3m1�128�class3�0
-c3m2�128�class3�0
-class1�1�0
-class2�1�0
-class3�1�0
-class4�1�0
-func1�16�0
-func2�16�0
-method1�128�class1�0
-method1�128�class4�0
-method2�128�class1�0
-method2�128�class4�0
-method3�128�class1�0
-method4�128�class1�0
+c2m1�128�()�class2�0
+c2m2�128�(f)�class2�0
+c2m3�128�(f)�class2�0
+c3m1�128�()�class3�0
+c3m2�128�()�class3�0
+class1�1�()�0
+class2�1�()�0
+class3�1�()�0
+class4�1�()�0
+func1�16�()�0
+func2�16�()�0
+method1�128�()�class1�0
+method1�128�()�class4�0
+method2�128�()�class1�0
+method2�128�()�class4�0
+method3�128�()�class1�0
+method4�128�()�class1�0
Modified: tests/ctags/js-class-related-unterminated.js.tags
24 lines changed, 12 insertions(+), 12 deletions(-)
===================================================================
@@ -1,16 +1,16 @@
# format=tagmanager
A�64�Cls�0
-B�1�Cls�0
-C�1�Cls�0
+B�1�(a, b)�Cls�0
+C�1�()�Cls�0
Cls�1�0
-Sub�1�Cls.B�0
+Sub�1�()�Cls.B�0
dyn1�128�Cls.B.Sub�0
-m1�128�Cls.B�0
-m2�128�Cls.B�0
-m3�128�Cls.B�0
-m4�128�Cls.B�0
-m5�128�Cls.B�0
-m6�128�Cls.B�0
-main�16�0
-n1�128�Cls.C�0
-n2�128�Cls.C�0
+m1�128�(a)�Cls.B�0
+m2�128�(b)�Cls.B�0
+m3�128�(c)�Cls.B�0
+m4�128�(d)�Cls.B�0
+m5�128�(e)�Cls.B�0
+m6�128�(f)�Cls.B�0
+main�16�()�0
+n1�128�()�Cls.C�0
+n2�128�()�Cls.C�0
Modified: tests/ctags/js-scope.js.tags
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -1,4 +1,4 @@
# format=tagmanager
-A�1�0
-m1�128�A�0
-m2�128�A�0
+A�1�()�0
+m1�128�()�A�0
+m2�128�()�A�0
Modified: tests/ctags/js-signature.js
38 lines changed, 38 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,38 @@
+
+function f1() {
+}
+function f2(arg1, arg2) {
+}
+function f3(
+ arg1, // first
+ arg2, // second
+ arg3 // last
+) {
+ // ...
+}
+function f4(a, b, c) {
+}
+
+function Cls(name) {
+ this.name = name;
+}
+Cls.prototype = {
+ get_name: function() {
+ return this.name;
+ },
+ set_name: function(name) {
+ this.name = name;
+ },
+}
+
+Cls.prototype.hello = function(tpl) {
+ if (tpl == undefined) tpl = "hello {}";
+ return tpl.replace ('{}', this.name);
+}
+
+main = function() {
+ c = new Cls("John");
+ print(c.hello());
+}
+
+main();
Modified: tests/ctags/js-signature.js.tags
10 lines changed, 10 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,10 @@
+# format=tagmanager
+Cls�1�(name)�0
+f1�16�()�0
+f2�16�(arg1, arg2)�0
+f3�16�( arg1, arg2, arg3 )�0
+f4�16�(a, b, c)�0
+get_name�128�()�Cls�0
+hello�128�(tpl)�Cls�0
+main�16�()�0
+set_name�128�(name)�Cls�0
Modified: tests/ctags/js-sub-block-scope.js.tags
14 lines changed, 7 insertions(+), 7 deletions(-)
===================================================================
@@ -1,8 +1,8 @@
# format=tagmanager
-bar�16�parent�0
-foo�16�parent�0
-hello�16�parent.foo�0
-hello2�16�parent.bar�0
-hi�16�parent.foo�0
-hi2�16�parent.bar�0
-parent�16�0
+bar�16�()�parent�0
+foo�16�()�parent�0
+hello�16�()�parent.foo�0
+hello2�16�()�parent.bar�0
+hi�16�()�parent.foo�0
+hi2�16�()�parent.bar�0
+parent�16�()�0
Modified: tests/ctags/js-unknown-construct-nesting.js.tags
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -1,5 +1,5 @@
# format=tagmanager
-aa�128�o�0
-bb�128�o�0
-cc�128�o�0
+aa�128�()�o�0
+bb�128�(a)�o�0
+cc�128�()�o�0
o�1�0
Modified: tests/ctags/jsFunc_tutorial.js.tags
88 lines changed, 44 insertions(+), 44 deletions(-)
===================================================================
@@ -1,30 +1,30 @@
# format=tagmanager
-Ball1�16�0
-Ball3�16�0
-D1�16�0
-D2�16�0
-D2A�16�0
+Ball1�16�()�0
+Ball3�16�()�0
+D1�16�(a, b)�0
+D2�16�(a, b)�0
+D2A�16�(a, b)�0
D3�16�0
D4�16�0
-D5�16�0
-DT1�16�0
-DT2�16�0
-DT2A�16�0
-DT3�16�0
-DT4�1�0
-DT5�1�0
-DT6�1�0
-DT7�1�0
-DT7A�1�0
-DT8�1�0
-DT9�1�0
-PT1�16�0
-PT2�1�0
-PT3�1�0
-add�16�myObject�0
-addSalary�128�PT3�0
-addSalaryFunction�1�0
-addSalaryFunctionDT9�1�0
+D5�16�(myOperator)�0
+DT1�16�()�0
+DT2�16�(message)�0
+DT2A�16�(message)�0
+DT3�16�()�0
+DT4�1�(message, specifiedName)�0
+DT5�1�(color, specifiedName, owner, weight)�0
+DT6�1�(name, salary, mySupervisor)�0
+DT7�1�(name, salary)�0
+DT7A�1�(name, salary)�0
+DT8�1�(name, salary)�0
+DT9�1�(name, salary)�0
+PT1�16�()�0
+PT2�1�(name, color)�0
+PT3�1�(name, salary)�0
+add�16�(a,b)�myObject�0
+addSalary�128�(addition)�PT3�0
+addSalaryFunction�1�(addition)�0
+addSalaryFunctionDT9�1�(addition)�0
ball0�16384�0
ball1�16384�0
ball2�16384�0
@@ -40,32 +40,32 @@ boss
boss1�16384�0
boss2�16384�0
boss3�16384�0
-calculate�16�getHalfOf7�0
-calculate�16�getHalfOf8�0
-calculate8�16�0
-getHalfOf7�16�0
-getHalfOf8�16�0
-getSalary�128�DT7�0
-getSalary�128�DT7A�0
-getSalary�128�DT8�0
-getSalary�128�PT3�0
-getSalaryFunctionDT9�16�0
+calculate�16�(number)�getHalfOf7�0
+calculate�16�(number)�getHalfOf8�0
+calculate8�16�(number)�0
+getHalfOf7�16�(num1, num2, num3)�0
+getHalfOf8�16�(num1, num2, num3)�0
+getSalary�128�()�DT7�0
+getSalary�128�()�DT7A�0
+getSalary�128�()�DT8�0
+getSalary�128�()�PT3�0
+getSalaryFunctionDT9�16�()�0
livesIn�128�PT2�0
manager�16384�0
-myFunction4�16�0
-myFunction5�16�0
-myFunction6�16�0
-myFunction6A�16�0
-myFunction6AE�16�0
-myFunction6B�16�0
-myFunction6E�16�0
+myFunction4�16�(message)�0
+myFunction5�16�()�0
+myFunction6�16�()�0
+myFunction6A�16�()�0
+myFunction6AE�16�()�0
+myFunction6B�16�()�0
+myFunction6E�16�()�0
myObject�16384�0
my_global_var1�16384�0
object1�16384�0
object2�16384�0
object3�16384�0
price�128�PT2�0
-savedFunc6B�16�0
-sayName4A�16�0
+savedFunc6B�16�()�0
+sayName4A�16�(name)�0
teamLeader�16384�0
-theAdd�16�0
+theAdd�16�(a, b)�0
Modified: tests/ctags/no_terminator.js.tags
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -1,6 +1,6 @@
# format=tagmanager
-checkForUpdate�16�0
-checkForUpdate2�16�0
-getParent�16�0
-ts_resortTable�16�0
-ts_sort_currency�16�0
+checkForUpdate�16�()�0
+checkForUpdate2�16�()�0
+getParent�16�(el, pTagName)�0
+ts_resortTable�16�(lnk)�0
+ts_sort_currency�16�(a,b)�0
Modified: tests/ctags/parenthesis-rvalue.js.tags
24 lines changed, 12 insertions(+), 12 deletions(-)
===================================================================
@@ -5,19 +5,19 @@ a1
a2�16384�0
b�64�d1�0
b�64�d2�0
-b1�16�0
-b1sub�16�b1�0
-b2�16�0
-b2sub�16�b2�0
-b3�16�0
-b3sub�16�b3�0
+b1�16�()�0
+b1sub�16�()�b1�0
+b2�16�()�0
+b2sub�16�()�b2�0
+b3�16�()�0
+b3sub�16�()�b3�0
c1�16384�0
c2�16384�0
d1�1�0
d2�1�0
-e1�16�0
-e1sub�16�e1�0
-e2�16�0
-e2sub�16�e2�0
-e3�16�0
-e3sub�16�e3�0
+e1�16�()�0
+e1sub�16�()�e1�0
+e2�16�()�0
+e2sub�16�()�e2�0
+e3�16�()�0
+e3sub�16�()�e3�0
Modified: tests/ctags/regexp.js.tags
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -1,6 +1,6 @@
# format=tagmanager
-func1�16�0
-func2�16�0
+func1�16�()�0
+func2�16�()�0
no_re1�16384�0
no_re2�16384�0
no_re3�16384�0
Modified: tests/ctags/secondary_fcn_name.js.tags
8 lines changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -1,6 +1,6 @@
# format=tagmanager
-D1�16�0
-D2�16�0
-D2A�16�0
+D1�16�(a, b)�0
+D2�16�(a, b)�0
+D2A�16�(a, b)�0
my_global_var1�16384�0
-theAdd�16�0
+theAdd�16�(a, b)�0
Modified: tests/ctags/shebang.js.tags
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1,2 +1,2 @@
# format=tagmanager
-f�16�0
+f�16�()�0
Modified: tests/ctags/simple.js.tags
34 lines changed, 17 insertions(+), 17 deletions(-)
===================================================================
@@ -1,25 +1,25 @@
# format=tagmanager
Database�1�0
-ValidClassOne�1�testlib.extras�0
-ValidClassTwo�1�0
-calculate�16�getHalfOf�0
+ValidClassOne�1�(a,b)�testlib.extras�0
+ValidClassTwo�1�()�0
+calculate�16�(number)�getHalfOf�0
executeQueryString�128�Database�0
-getHalfOf�16�0
+getHalfOf�16�(num1, num2, num3)�0
getTodaysDate�128�Database�0
-innerThree�16�validFunctionThree�0
-invalidInnerFunction�16�0
+innerThree�16�(a,b)�validFunctionThree�0
+invalidInnerFunction�16�(a,b)�0
my_global_var1�16384�0
my_global_var2�16384�0
my_global_var3�16384�0
-my_global_var4�16�0
+my_global_var4�16�()�0
my_global_var4�16384�0
-validFunctionFive�16�testlib�0
-validFunctionFour�16�extra�0
-validFunctionOne�16�0
-validFunctionSix�16�testlib.core�0
-validFunctionThree�16�0
-validFunctionTwo�16�0
-validMethodFour�128�ValidClassTwo�0
-validMethodOne�128�testlib.extras.ValidClassOne�0
-validMethodThree�128�ValidClassTwo�0
-validMethodTwo�128�testlib.extras.ValidClassOne�0
+validFunctionFive�16�(a,b)�testlib�0
+validFunctionFour�16�(a,b)�extra�0
+validFunctionOne�16�(a,b)�0
+validFunctionSix�16�(a,b)�testlib.core�0
+validFunctionThree�16�(a,b)�0
+validFunctionTwo�16�(a,b)�0
+validMethodFour�128�()�ValidClassTwo�0
+validMethodOne�128�(a,b)�testlib.extras.ValidClassOne�0
+validMethodThree�128�()�ValidClassTwo�0
+validMethodTwo�128�(a,b)�testlib.extras.ValidClassOne�0
Modified: tests/ctags/ui5.controller.js.tags
10 lines changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -1,6 +1,6 @@
# format=tagmanager
-onInit�128�app.my_form�0
-refreshForm�128�app.my_form�0
-refreshSettlements�128�app.my_form�0
-setRefreshed�128�app.my_form�0
-successfulRequest�128�app.my_form�0
+onInit�128�()�app.my_form�0
+refreshForm�128�(AUFNR)�app.my_form�0
+refreshSettlements�128�(AUFNR)�app.my_form�0
+setRefreshed�128�(value)�app.my_form�0
+successfulRequest�128�(data)�app.my_form�0
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list