aboutsummaryrefslogtreecommitdiff
path: root/lib/mozilla-ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-11-08 15:38:32 +0000
committerGitHub <noreply@github.com>2020-11-08 23:38:32 +0800
commit91fc1c82b56986df51ad1450c18718bc585deca9 (patch)
treea534652eea79949356bee8a877b71a49a5b18e82 /lib/mozilla-ast.js
parent810cd40356f6fa1ddbc9c97a0df95bd1d94a2720 (diff)
downloadtracifyjs-91fc1c82b56986df51ad1450c18718bc585deca9.tar.gz
tracifyjs-91fc1c82b56986df51ad1450c18718bc585deca9.zip
support computed property name in object literal (#4268)
Diffstat (limited to 'lib/mozilla-ast.js')
-rw-r--r--lib/mozilla-ast.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/mozilla-ast.js b/lib/mozilla-ast.js
index 1ce16921..3ceaf584 100644
--- a/lib/mozilla-ast.js
+++ b/lib/mozilla-ast.js
@@ -115,9 +115,6 @@
value : from_moz(M.value)
};
if (M.kind == "init") return new AST_ObjectKeyVal(args);
- args.key = new AST_SymbolAccessor({
- name: args.key
- });
args.value = new AST_Accessor(args.value);
if (M.kind == "get") return new AST_ObjectGetter(args);
if (M.kind == "set") return new AST_ObjectSetter(args);
@@ -385,7 +382,7 @@
def_to_moz(AST_ObjectProperty, function To_Moz_Property(M) {
var key = {
type: "Literal",
- value: M.key instanceof AST_SymbolAccessor ? M.key.name : M.key
+ value: M.key
};
var kind;
if (M instanceof AST_ObjectKeyVal) {