[geany/geany] f65dec: javascript: Fix more handling of class-related unterminated statements
Colomban Wendling
git-noreply at xxxxx
Mon Nov 24 01:48:55 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:48:55 UTC
Commit: f65dec49e796fa7770d9ee1b56a570b7987a7aad
https://github.com/geany/geany/commit/f65dec49e796fa7770d9ee1b56a570b7987a7aad
Log Message:
-----------
javascript: Fix more handling of class-related unterminated statements
Modified Paths:
--------------
tagmanager/ctags/js.c
tests/ctags/js-class-related-unterminated.js
tests/ctags/js-class-related-unterminated.js.tags
Modified: tagmanager/ctags/js.c
5 lines changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -1229,6 +1229,8 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
}
else
addContext (name, token);
+
+ readToken (token);
}
else if ( isKeyword(token, KEYWORD_prototype) )
{
@@ -1321,7 +1323,8 @@ static boolean parseStatement (tokenInfo *const token, tokenInfo *const parent,
}
}
}
- readToken (token);
+ else
+ readToken (token);
} while (isType (token, TOKEN_PERIOD));
}
Modified: tests/ctags/js-class-related-unterminated.js
12 lines changed, 12 insertions(+), 0 deletions(-)
===================================================================
@@ -39,6 +39,18 @@ Cls.B.prototype.m5 = function(e) {
Cls.B.prototype.m6 = function(f) {
}
+Cls.C = function () {
+ this.a = 0;
+}
+
+Cls.C.prototype = {
+ n1: function() {
+ Cls.C.prototype = Cls.C.prototype
+ },
+ n2: function() {
+ }
+}
+
function main() {
var c = new Cls.B(1, 2);
var d = new Cls.B.Sub();
Modified: tests/ctags/js-class-related-unterminated.js.tags
3 lines changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -1,6 +1,7 @@
# format=tagmanager
A�64�Cls�0
B�1�Cls�0
+C�1�Cls�0
Cls�1�0
Sub�1�Cls.B�0
dyn1�128�Cls.B.Sub�0
@@ -11,3 +12,5 @@ m4
m5�128�Cls.B�0
m6�128�Cls.B�0
main�16�0
+n1�128�Cls.C�0
+n2�128�Cls.C�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