change interface for visitor in description

pull/55/merge
Donald Pipowitch 7 years ago committed by James Kyle
parent 386d1efd5b
commit 4f7a85a9f8

@ -709,16 +709,31 @@ function parser(tokens) {
* encounter a node with a matching type. * encounter a node with a matching type.
* *
* traverse(ast, { * traverse(ast, {
* Program(node, parent) { * Program: {
* // ... * enter(node, parent) {
* // ...
* },
* exit(node, parent) {
* // ...
* },
* }, * },
* *
* CallExpression(node, parent) { * CallExpression: {
* // ... * enter(node, parent) {
* // ...
* },
* exit(node, parent) {
* // ...
* },
* }, * },
* *
* NumberLiteral(node, parent) { * NumberLiteral: {
* // ... * enter(node, parent) {
* // ...
* },
* exit(node, parent) {
* // ...
* },
* }, * },
* }); * });
*/ */

Loading…
Cancel
Save