Files
react-native-devtools-frontend/node_modules/recast/example/generic-identity
T
Tim van der Lippe 0c42b5bb12 Add recast to node_modules/
It will be used in a check to enforce license headers

DISABLE_THIRD_PARTY_CHECK=Adds recast to node_modules

Change-Id: I822a368d9ba22058ac2586ea3638089a2f5b1d18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016746
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-23 13:38:45 +00:00

18 lines
401 B
JavaScript
Executable File

#!/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);
});