add support for semicolons as class elements

This commit is contained in:
Sebastian McKenzie 2015-01-04 18:20:08 +11:00
parent 9c3c569ac6
commit 55b3e96d95
2 changed files with 5 additions and 1 deletions

View File

@ -3063,6 +3063,10 @@
classBody.body = []; classBody.body = [];
expect(_braceL); expect(_braceL);
while (!eat(_braceR)) { while (!eat(_braceR)) {
if (eat(_semi)) {
continue;
}
var method = startNode(); var method = startNode();
if (options.ecmaVersion >= 7 && tokType === _name && tokVal === "private") { if (options.ecmaVersion >= 7 && tokType === _name && tokVal === "private") {
next(); next();

View File

@ -2,7 +2,7 @@
"name": "acorn-6to5", "name": "acorn-6to5",
"description": "Acorn fork used by 6to5", "description": "Acorn fork used by 6to5",
"main": "acorn.js", "main": "acorn.js",
"version": "0.11.1-5", "version": "0.11.1-6",
"maintainers": [ "maintainers": [
{ {
"name": "Marijn Haverbeke", "name": "Marijn Haverbeke",