ruby: handle singleton method including ?!= in its name(sf.bug:364)
[geany-mirror.git] / tests / ctags / bug3571233.js
blobd621cb1128f11d98401b3f94a0bc20ab4bcdbf11
1 /*\r
2  * "Functions nested inside methods show improper scope with the parent method\r
3  * being reported as "function""\r
4  * \r
5  * ctags -f - bug3571233.js should output:\r
6  * \r
7  * classes\r
8  *    MyClass\r
9  * \r
10  * methods\r
11  *    MyClass.method2\r
12  * \r
13  * functions\r
14  *    MyClass.method2.nestedFunction1\r
15  *    MyClass.method2.nestedFunction2\r
16  *    function1\r
17  *    function1.nestedFunction3\r
18  *    function2\r
19  *    function2.nestedFunction4\r
20  *    function2.nestedFunction5\r
21  * \r
22  * \r
23  * Note that MyClass is shown both as a class and as a function (the parser\r
24  * discovers it actually is a class only later on).  This isn't really easy to\r
25  * fix because a JavaScript function is only a class if it happen to be used as\r
26  * one, for example it has prototypes.\r
27  */\r
29 function MyClass() {\r
30 }\r
32 MyClass.prototype.method2 = function() {\r
33   // these functions have improper scope\r
34   function nestedFunction1() {\r
35     \r
36   }\r
37   \r
38   function nestedFunction2() {\r
39     \r
40   }\r
41 };\r
43 // following work fine, just here as a reference\r
44 function function1() {\r
45   function nestedFunction3() {\r
46   }\r
47 };\r
49 function2 = function() {\r
50   function nestedFunction4() {\r
51   }\r
52   \r
53   function nestedFunction5() {\r
54   }\r
55 };\r