JavaScript: recognize assignation to a parenthesized expression
This commit is contained in:
parent
b596aa14e8
commit
3ff01aeeb3
@ -1433,6 +1433,8 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class)
|
||||
/*
|
||||
* Handle nameless functions
|
||||
* this.method_name = () {}
|
||||
* Also assignments starting with parentheses
|
||||
* var foo = (1 + 2) * 3;
|
||||
*/
|
||||
skipArgumentList(token);
|
||||
|
||||
@ -1446,6 +1448,8 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class)
|
||||
}
|
||||
else if (isType (token, TOKEN_CLOSE_CURLY))
|
||||
is_terminated = FALSE;
|
||||
else if (token->nestLevel == 0 && is_global)
|
||||
makeJsTag (name, JSTAG_VARIABLE);
|
||||
}
|
||||
else if (isType (token, TOKEN_OPEN_CURLY))
|
||||
{
|
||||
|
@ -1,4 +1,6 @@
|
||||
var x = 1;
|
||||
var z = {};
|
||||
var y = [];
|
||||
var a = (42 + 1) * 2;
|
||||
var b = 2 * (42 + 1);
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
# format=tagmanager
|
||||
aフ16384ヨ0
|
||||
bフ16384ヨ0
|
||||
xÌ16384Ö0
|
||||
yÌ16384Ö0
|
||||
zÌ16384Ö0
|
||||
|
Loading…
x
Reference in New Issue
Block a user