Design Patterns · Middle · Question 15 of 75

Which pattern does a Babel or ESLint plugin use when it walks the AST with Identifier() and CallExpression() methods?

Explanation

Visitor lets you add new operations over a structure (checks, transformations) without changing the node classes. The traverser calls the visitor's method for each node type.

Further reading

Problem with a question

Design Patterns · Middle · question 15

Test yourself

Take the Design Patterns · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz