upgrade AST<->ESTree translation (#5554)
This commit is contained in:
@@ -192,6 +192,19 @@
|
||||
value: from_moz(M.value),
|
||||
});
|
||||
},
|
||||
StaticBlock: function(M) {
|
||||
var start = my_start_token(M);
|
||||
var end = my_end_token(M);
|
||||
return new AST_ClassInit({
|
||||
start: start,
|
||||
end: end,
|
||||
value: new AST_ClassInitBlock({
|
||||
start: start,
|
||||
end: end,
|
||||
body: normalize_directives(M.body.map(from_moz)),
|
||||
}),
|
||||
});
|
||||
},
|
||||
ForOfStatement: function(M) {
|
||||
return new (M.await ? AST_ForAwaitOf : AST_ForOf)({
|
||||
start: my_start_token(M),
|
||||
@@ -714,6 +727,10 @@
|
||||
};
|
||||
});
|
||||
|
||||
def_to_moz(AST_ClassInit, function To_Moz_StaticBlock(M) {
|
||||
return to_moz_scope("StaticBlock", M.value);
|
||||
});
|
||||
|
||||
function To_Moz_ForOfStatement(is_await) {
|
||||
return function(M) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user