convert AST_Seq from binary tree to array (#1460)

- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
This commit is contained in:
Alex Lam S.L
2017-04-12 21:56:27 +08:00
committed by GitHub
parent 04b8964505
commit 2244743545
14 changed files with 376 additions and 307 deletions

View File

@@ -149,7 +149,11 @@
});
},
SequenceExpression: function(M) {
return AST_Seq.from_array(M.expressions.map(from_moz));
return new AST_Sequence({
start : my_start_token(M),
end : my_end_token(M),
expressions: M.expressions.map(from_moz)
});
},
MemberExpression: function(M) {
return new (M.computed ? AST_Sub : AST_Dot)({
@@ -332,10 +336,10 @@
};
});
def_to_moz(AST_Seq, function To_Moz_SequenceExpression(M) {
def_to_moz(AST_Sequence, function To_Moz_SequenceExpression(M) {
return {
type: "SequenceExpression",
expressions: M.to_array().map(to_moz)
expressions: M.expressions.map(to_moz)
};
});