Tolerate expansions in vardefs, too!
This commit is contained in:
committed by
Richard van Velzen
parent
d4f17f29ae
commit
079aaa0d48
@@ -1221,6 +1221,15 @@ function parse($TEXT, options) {
|
||||
children.push(new AST_Hole({ start: S.token, end: S.token }));
|
||||
} else if (is("punc", "[") || is("punc", "{")) {
|
||||
children.push(destructuring_(sym_type));
|
||||
} else if (is("expand", "...")) {
|
||||
next();
|
||||
var symbol = _make_symbol(sym_type);
|
||||
children.push(new AST_Expansion({
|
||||
start: prev(),
|
||||
symbol: symbol,
|
||||
end: S.token
|
||||
}));
|
||||
next();
|
||||
} else if (is("name")) {
|
||||
children.push(_make_symbol(sym_type));
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user