@@ -1783,6 +1783,9 @@ function OutputStream(options) {
|
|||||||
output.print(self.strings[i]);
|
output.print(self.strings[i]);
|
||||||
output.print("`");
|
output.print("`");
|
||||||
});
|
});
|
||||||
|
DEFPRINT(AST_BigInt, function(output) {
|
||||||
|
output.print(this.value + "n");
|
||||||
|
});
|
||||||
DEFPRINT(AST_Constant, function(output) {
|
DEFPRINT(AST_Constant, function(output) {
|
||||||
output.print("" + this.value);
|
output.print("" + this.value);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -391,7 +391,8 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
|
|||||||
var valid = parse_js_number(num);
|
var valid = parse_js_number(num);
|
||||||
if (isNaN(valid)) parse_error("Invalid syntax: " + num);
|
if (isNaN(valid)) parse_error("Invalid syntax: " + num);
|
||||||
if (has_dot || has_e || peek() != "n") return token("num", valid);
|
if (has_dot || has_e || peek() != "n") return token("num", valid);
|
||||||
return token("bigint", num.toLowerCase() + next());
|
next();
|
||||||
|
return token("bigint", num.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
function read_escaped_char(in_string) {
|
function read_escaped_char(in_string) {
|
||||||
|
|||||||
@@ -90,3 +90,17 @@ issue_4801: {
|
|||||||
expect_stdout: "PASS"
|
expect_stdout: "PASS"
|
||||||
node_version: ">=10.4.0"
|
node_version: ">=10.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5728: {
|
||||||
|
options = {
|
||||||
|
evaluate: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
console.log("" + 4n + 2);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console.log("42");
|
||||||
|
}
|
||||||
|
expect_stdout: "42"
|
||||||
|
node_version: ">=10.4.0"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user