Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 734 Bytes

File metadata and controls

45 lines (30 loc) · 734 Bytes

decaffeinate-traverse

DEPRECATED

This project is no longer in use and should be considered deprecated.


Traverse programs parsed using decaffeinate-parser.

Install

$ npm install [--save-dev] decaffeinate-traverse

Usage

/**
 * This example prints all identifiers in a program. In this case, it prints:
 *
 *     a
 *     b
 *
 */

import { Visitor } from 'decaffeinate-traverse';
import { parse } from 'decaffeinate-parser';

class IdentifierPrinter extends Visitor {
  visitIdentifier(node) {
    console.log(node.data);
  }
}

new IdentifierPrinter().visit(parse('a + b'));

License

MIT