Skip to content

Commit

Permalink
Fix: remove workarounds for acorn < 4 (#372)
Browse files Browse the repository at this point in the history
Fixes #338
  • Loading branch information
realityking authored and not-an-aardvark committed Apr 4, 2018
1 parent fd305e5 commit 56c5a9c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions espree.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,6 @@ function esprimaFinishNode(result) {
this.unexpected(result.start);
}

// https://github.com/marijnh/acorn/issues/323
if (result.type === "TryStatement") {
delete result.guardedHandlers;
} else if (result.type === "CatchClause") {
delete result.guard;
}

// Acorn doesn't count the opening and closing backticks as part of templates
// so we have to adjust ranges/locations appropriately.
if (result.type === "TemplateElement") {
Expand All @@ -209,11 +202,6 @@ function esprimaFinishNode(result) {
}
}

// Acorn uses undefined instead of null, which affects serialization
if (result.type === "Literal" && result.value === undefined) {
result.value = null;
}

if (extra.attachComment) {
commentAttachment.processComment(result);
}
Expand Down

0 comments on commit 56c5a9c

Please sign in to comment.