Skip to content

Commit

Permalink
Separately walk over ClassBody
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine authored and marijnh committed Feb 7, 2018
1 parent 7d3267d commit 24147c6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/walk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,11 @@ base.ClassDeclaration = base.ClassExpression = (node, st, c) => c(node, st, "Cla
base.Class = (node, st, c) => {
if (node.id) c(node.id, st, "Pattern")
if (node.superClass) c(node.superClass, st, "Expression")
for (let item of node.body.body)
c(item, st)
c(node.body, st)
}
base.ClassBody = (node, st, c) => {
for (let elt of node.body)
c(elt, st)
}
base.MethodDefinition = base.Property = (node, st, c) => {
if (node.computed) c(node.key, st, "Expression")
Expand Down

0 comments on commit 24147c6

Please sign in to comment.