Implement new.target
This commit is contained in:
@@ -1292,6 +1292,14 @@ function parse($TEXT, options) {
|
||||
var new_ = function(allow_calls) {
|
||||
var start = S.token;
|
||||
expect_token("operator", "new");
|
||||
if (is("punc", ".")) {
|
||||
next();
|
||||
expect_token("name");
|
||||
return subscripts(new AST_NewTarget({
|
||||
start : start,
|
||||
end : prev()
|
||||
}), allow_calls);
|
||||
}
|
||||
var newexp = expr_atom(false), args;
|
||||
if (is("punc", "(")) {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user