Accept immediately calls the visit method on the visitor, passing the node as a parameter.
accept直接对访问器调用visit方法,并把节点作为参数传递。
Visit-node takes a list of visitor functions, each with a signature (fn [node state]) that returns a context map, which can contain the keys: node, : state, : stop, or: jump.
visit - node获取一个访问者函数列表,其中每个函数都有一个返回上下文映射的签名(fn [node state]),上下文映射中可能包含键:node、: state、: stop或:jump。
The primary difference in tree-visitor is that the visit-node function returns several items: a new-node, a new-state, and a stop flag.
tree-visitor 中的主要差别在于,visit-node 函数返回多个项目:一个 new-node、一个 new-state 和一个 stop 标记。
应用推荐