Add stray semicolons as class elements

This commit is contained in:
Sebastian McKenzie
2015-01-04 21:08:39 +11:00
committed by Marijn Haverbeke
parent dac747dfa9
commit 9f7cb55264
2 changed files with 38 additions and 1 deletions

View File

@@ -8859,6 +8859,42 @@ test("class A { foo() {} get foo() {} }",{
locations: true
});
test("class Semicolon { ; }", {
type: "Program",
loc: {
start: {line: 1, column: 0},
end: {line: 1, column: 21}
},
body: [{
type: "ClassDeclaration",
loc: {
start: {line: 1, column: 0},
end: {line: 1, column: 21}
},
id: {
type: "Identifier",
loc: {
start: {line: 1, column: 6},
end: {line: 1, column: 15}
},
name: "Semicolon"
},
superClass: null,
body: {
type: "ClassBody",
loc: {
start: {line: 1, column: 16},
end: {line: 1, column: 21}
},
body: []
}
}]
}, {
ecmaVersion: 6,
ranges: true,
locations: true
});
// ES6: Computed Properties
test("({[x]: 10})", {