minor clean-ups (#5282)
This commit is contained in:
@@ -11,6 +11,21 @@ async_arrow: {
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
async_computed: {
|
||||
input: {
|
||||
var o = {
|
||||
async [42]() {
|
||||
return this.p;
|
||||
},
|
||||
p: "PASS",
|
||||
};
|
||||
o[42]().then(console.log);
|
||||
}
|
||||
expect_exact: 'var o={async[42](){return this.p},p:"PASS"};o[42]().then(console.log);'
|
||||
expect_stdout: "PASS"
|
||||
node_version: ">=8"
|
||||
}
|
||||
|
||||
async_label: {
|
||||
input: {
|
||||
(async function() {
|
||||
|
||||
@@ -26,9 +26,11 @@ exports.run_code = semver.satisfies(process.version, "0.8") ? function(code, top
|
||||
return stdout;
|
||||
} : semver.satisfies(process.version, "<0.12") ? run_code_vm : function(code, toplevel, timeout) {
|
||||
if ([
|
||||
/\basync[ \t]*\([\s\S]*?\)[ \t]*=>/,
|
||||
/\b(async[ \t]+function|Promise|setImmediate|setInterval|setTimeout)\b/,
|
||||
/\basync([ \t]+|[ \t]*#|[ \t]*\*[ \t]*)[^\s()[\]{}#:;,.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
|
||||
/\basync([ \t]+|[ \t]*#)[^\s()[\]{}#:;,.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
|
||||
/\basync[ \t]*\*[ \t]*[^\s()[\]{}#:;,.&|!~=*%/+-]+\s*\(/,
|
||||
/\basync([ \t]*\*)?[ \t]*\[[\s\S]*?\]\s*\(/,
|
||||
/\basync[ \t]*\([\s\S]*?\)[ \t]*=>/,
|
||||
].some(function(pattern) {
|
||||
return pattern.test(code);
|
||||
})) {
|
||||
|
||||
@@ -2290,7 +2290,7 @@ function fuzzy_match(original, uglified) {
|
||||
return true;
|
||||
|
||||
function collect(input, nums) {
|
||||
return input.replace(/-?([1-9][0-9]*(\.[0-9]+)?|0\.[0-9]+)(e-?[1-9][0-9]*)?/ig, function(num) {
|
||||
return input.replace(/-?([1-9][0-9]*(\.[0-9]+)?|0\.[0-9]+)(e-?[1-9][0-9]*)?/gi, function(num) {
|
||||
return "<|" + nums.push(+num) + "|>";
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user