[geany/geany] bc9b2f: JavaScript: don't choke on array lists
Colomban Wendling
git-noreply at xxxxx
Sun Aug 3 14:52:11 UTC 2014
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 03 Aug 2014 14:52:11 UTC
Commit: bc9b2fa4445b6b870f2be942aa27d49994985ae9
https://github.com/geany/geany/commit/bc9b2fa4445b6b870f2be942aa27d49994985ae9
Log Message:
-----------
JavaScript: don't choke on array lists
Modified Paths:
--------------
tagmanager/ctags/js.c
tests/ctags/Makefile.am
tests/ctags/arraylist.js
tests/ctags/arraylist.js.tags
Modified: tagmanager/ctags/js.c
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -660,6 +660,10 @@ static void findCmdTerm (tokenInfo *const token)
{
skipArgumentList(token);
}
+ else if ( isType (token, TOKEN_OPEN_SQUARE) )
+ {
+ skipArrayList(token);
+ }
else
{
readToken (token);
Modified: tests/ctags/Makefile.am
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -14,6 +14,7 @@ test_sources = \
68hc11.asm \
angle_bracket.cpp \
anonymous_functions.php \
+ arraylist.js \
array_ref_and_out.cs \
array_spec.f90 \
array-spec.f90 \
Modified: tests/ctags/arraylist.js
20 lines changed, 20 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,20 @@
+
+var a = [];
+var b = [1, 2, 3];
+var c = [
+ { a: "hello", b: 42 },
+ { a: "hi", b: 41 }
+];
+
+var class = function() {
+ this.test1 = {
+ foo: [ 1, 2, 3],
+ bar: [ 4, 5, 9]
+ };
+ // FIXME: no tag is generated for test2
+ this.test2 = [
+ { a: {}, b: {} },
+ { a: {}, b: {} }
+ ];
+ this.test3 = function() {}
+}
Modified: tests/ctags/arraylist.js.tags
9 lines changed, 9 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,9 @@
+# format=tagmanager
+a�16384�0
+b�16384�0
+bar�64�class.test1�0
+c�16384�0
+class�1�0
+foo�64�class.test1�0
+test1�1�class�0
+test3�128�class�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