add the ability to mark node paths

This commit is contained in:
Sebastian McKenzie 2015-08-24 15:33:27 -04:00
parent 171ba75140
commit 217a05ef9d

View File

@ -118,6 +118,18 @@ export default class NodePath {
traverse(visitor, state) {
traverse(this.node, visitor, this.scope, state, this);
}
/**
* [Please add a description.]
*/
mark(type, message) {
this.hub.file.metadata.marked.push({
type,
message,
loc: this.node.loc
});
}
}
/**