change interface for visitor in description

pull/61/head
Donald Pipowitch 7 years ago committed by GitHub
parent 386d1efd5b
commit 50b714c841

@ -709,16 +709,31 @@ function parser(tokens) {
* encounter a node with a matching type.
*
* 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