diff --git a/Sources/Fuzzilli/Compiler/Parser/parser.js b/Sources/Fuzzilli/Compiler/Parser/parser.js index 2ce2b9056..4fa1a0fbe 100644 --- a/Sources/Fuzzilli/Compiler/Parser/parser.js +++ b/Sources/Fuzzilli/Compiler/Parser/parser.js @@ -159,6 +159,8 @@ function parse(script, proto) { property.name = field.key.name; } else if (field.key.type === 'NumericLiteral') { property.index = field.key.value; + } else if (field.key.type === 'StringLiteral') { + property.name = field.key.value; } else { throw "Unknown property key type: " + field.key.type + " in class declaration"; } @@ -407,6 +409,8 @@ function parse(script, proto) { property.name = field.key.name; } else if (field.key.type === 'NumericLiteral') { property.index = field.key.value; + } else if (field.key.type === 'StringLiteral') { + property.name = field.key.value; } else { throw "Unknown property key type: " + field.key.type; }