You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
401 B
18 lines
401 B
#!/usr/bin/env node
|
|
|
|
// This script should reprint the contents of the given file without
|
|
// reusing the original source, but with identical AST structure.
|
|
|
|
var recast = require("recast");
|
|
|
|
recast.run(function(ast, callback) {
|
|
recast.visit(ast, {
|
|
visitNode: function(path) {
|
|
this.traverse(path);
|
|
path.node.original = null;
|
|
}
|
|
});
|
|
|
|
callback(ast);
|
|
});
|