javascript: Fix scope after some constructs
This commit is contained in:
parent
f886f7084a
commit
f158f5d362
@ -1243,7 +1243,6 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class)
|
|||||||
{
|
{
|
||||||
if ( is_class )
|
if ( is_class )
|
||||||
{
|
{
|
||||||
vStringCopy(saveScope, token->scope);
|
|
||||||
addToScope(token, name->string);
|
addToScope(token, name->string);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -159,6 +159,7 @@ test_sources = \
|
|||||||
intro.tex \
|
intro.tex \
|
||||||
invalid_name.f90 \
|
invalid_name.f90 \
|
||||||
java_enum.java \
|
java_enum.java \
|
||||||
|
js-scope.js \
|
||||||
jsFunc_tutorial.js \
|
jsFunc_tutorial.js \
|
||||||
keyword_abstract.cs \
|
keyword_abstract.cs \
|
||||||
keyword_catch_try.cs \
|
keyword_catch_try.cs \
|
||||||
|
18
tests/ctags/js-scope.js
Normal file
18
tests/ctags/js-scope.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
function A() {
|
||||||
|
this.a = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
A.prototype = {
|
||||||
|
m1 : function() {
|
||||||
|
this.a = 2;
|
||||||
|
|
||||||
|
foo.bar.baz.hello(1);
|
||||||
|
foo.bar.baz.hello(2);
|
||||||
|
foo.bar.baz.hello(3);
|
||||||
|
},
|
||||||
|
|
||||||
|
m2: function() {
|
||||||
|
return this.a;
|
||||||
|
},
|
||||||
|
};
|
4
tests/ctags/js-scope.js.tags
Normal file
4
tests/ctags/js-scope.js.tags
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# format=tagmanager
|
||||||
|
AÌ1Ö0
|
||||||
|
m1Ì128ÎAÖ0
|
||||||
|
m2Ì128ÎAÖ0
|
@ -1,6 +1,6 @@
|
|||||||
# format=tagmanager
|
# format=tagmanager
|
||||||
onInitÌ128Îapp.my_formÖ0
|
onInitÌ128Îapp.my_formÖ0
|
||||||
refreshFormÌ128Îsap.app.my_formÖ0
|
refreshFormÌ128Îapp.my_formÖ0
|
||||||
refreshSettlementsÌ128Îsap.app.my_formÖ0
|
refreshSettlementsÌ128Îapp.my_formÖ0
|
||||||
setRefreshedÌ128Îsap.app.my_formÖ0
|
setRefreshedÌ128Îapp.my_formÖ0
|
||||||
successfulRequestÌ128Îapp.my_formÖ0
|
successfulRequestÌ128Îapp.my_formÖ0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user