Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

精读《设计模式 - Visitor 访问者模式》 #306

Closed
ascoders opened this issue Mar 27, 2021 · 1 comment
Closed

精读《设计模式 - Visitor 访问者模式》 #306

ascoders opened this issue Mar 27, 2021 · 1 comment

Comments

@ascoders
Copy link
Owner

ascoders commented Mar 27, 2021

访问者模式。


精读《设计模式 - Visitor 访问者模式》

@niaogege
Copy link

babel中插件机制用到了这种设计模式,就是 AST 和 visitor 分离,在 traverse(遍历)AST 的时候,调用注册的 visitor 来对其进行处理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants