aboutsummaryrefslogtreecommitdiff
path: root/test/sandbox.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-05-22 03:12:37 +0100
committerGitHub <noreply@github.com>2021-05-22 10:12:37 +0800
commitd2a45ba441ed6975021b3524215c01a011dfb46a (patch)
treeff68f99235009ef8098b2c6c57a2f0ec50cc8a8e /test/sandbox.js
parentde376c3d3316fc4a33a876793eb4d693422415a0 (diff)
downloadtracifyjs-d2a45ba441ed6975021b3524215c01a011dfb46a.tar.gz
tracifyjs-d2a45ba441ed6975021b3524215c01a011dfb46a.zip
fix corner case in parsing private field/method (#4952)
fixes #4951
Diffstat (limited to 'test/sandbox.js')
-rw-r--r--test/sandbox.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sandbox.js b/test/sandbox.js
index 59b2a231..edebcabe 100644
--- a/test/sandbox.js
+++ b/test/sandbox.js
@@ -28,7 +28,7 @@ exports.run_code = semver.satisfies(process.version, "0.8") ? function(code, top
if ([
/\basync[ \t]*\([\s\S]*?\)[ \t]*=>/,
/\b(async[ \t]+function|setImmediate|setInterval|setTimeout)\b/,
- /\basync([ \t]+|[ \t]*\*[ \t]*)[^\s()[\]{},.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
+ /\basync([ \t]+|[ \t]*#|[ \t]*\*[ \t]*)[^\s()[\]{},.&|!~=*%/+-]+(\s*\(|[ \t]*=>)/,
].some(function(pattern) {
return pattern.test(code);
})) {