Revert "Merge branch 'do-optional-semicolon' of https://github.com/sebmck/acorn"
This reverts commit c526814896711439b89f613fe0412aad4c1730a8, reversing changes made to e7fea263dac65061941a4cee25c7a84c4e50c8bf.
This commit is contained in:
parent
03891a7f8c
commit
c87a7a7095
2
acorn.js
2
acorn.js
@ -2027,7 +2027,7 @@
|
||||
labels.pop();
|
||||
expect(_while);
|
||||
node.test = parseParenExpression();
|
||||
eat(_semi);
|
||||
semicolon();
|
||||
return finishNode(node, "DoWhileStatement");
|
||||
}
|
||||
|
||||
|
||||
@ -17911,49 +17911,6 @@ test("do keep(); while (true);", {
|
||||
}
|
||||
});
|
||||
|
||||
test("do {} while (false) foo();", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 26,
|
||||
body: [
|
||||
{
|
||||
type: "DoWhileStatement",
|
||||
start: 0,
|
||||
end: 19,
|
||||
body: {
|
||||
type: "BlockStatement",
|
||||
start: 3,
|
||||
end: 5,
|
||||
body: []
|
||||
},
|
||||
test: {
|
||||
type: "Literal",
|
||||
start: 13,
|
||||
end: 18,
|
||||
value: false,
|
||||
raw: "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 20,
|
||||
end: 26,
|
||||
expression: {
|
||||
type: "CallExpression",
|
||||
start: 20,
|
||||
end: 25,
|
||||
callee: {
|
||||
type: "Identifier",
|
||||
start: 20,
|
||||
end: 23,
|
||||
name: "foo"
|
||||
},
|
||||
arguments: []
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
test("do { x++; y--; } while (x < 10)", {
|
||||
type: "Program",
|
||||
body: [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user