Tolerate expansions in vardefs, too!
This commit is contained in:
committed by
Richard van Velzen
parent
d4f17f29ae
commit
079aaa0d48
10
lib/ast.js
10
lib/ast.js
@@ -363,14 +363,10 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", {
|
||||
}
|
||||
}, AST_Scope);
|
||||
|
||||
// TODO besides parameters and function calls, expansions can go in
|
||||
// arrays, array destructuring parameters, and array destructuring
|
||||
// assignment. But I'm not adding this right now because I'm trying
|
||||
// to do the most minimal and independent changesets.
|
||||
var AST_Expansion = DEFNODE("AST_Expansion", "symbol", {
|
||||
$documentation: "An expandible argument, such as ...rest",
|
||||
var AST_Expansion = DEFNODE("Expansion", "symbol", {
|
||||
$documentation: "An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",
|
||||
$propdoc: {
|
||||
symbol: "AST_SymbolFunarg the name of the argument as a SymbolFunarg"
|
||||
symbol: "AST_Symbol the thing to be expanded"
|
||||
},
|
||||
_walk: function(visitor) {
|
||||
var self = this;
|
||||
|
||||
Reference in New Issue
Block a user