Skip to content

Commit

Permalink
modifier for ObjectCallExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonak-Adipta-Kalita committed May 9, 2023
1 parent 2632d15 commit ae61631
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ast/modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func Modify(node Node, modifier ModifierFunc) Node {
node.Identifier = Modify(node.Value, modifier).(*StringLiteral)
node.Value = Modify(node.Value, modifier).(Expression)
node.Body = Modify(node.Body, modifier).(*BlockStatement)
case *ObjectCallExpression:
node.Object = Modify(node.Object, modifier).(Expression)
node.Call = Modify(node.Call, modifier).(Expression)
}
return modifier(node)
}

0 comments on commit ae61631

Please sign in to comment.