Skip to content

Commit

Permalink
Rename SourceInstrumentor to Instrumentor
Browse files Browse the repository at this point in the history
  • Loading branch information
twada committed May 2, 2014
1 parent 847d632 commit 8f86e94
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/espower.js
Expand Up @@ -92,17 +92,17 @@
* @return instrumented AST
*/
function espower (ast, options) {
var instrumentor = new SourceInstrumentor(extend(defaultOptions(), (options || {})));
var instrumentor = new Instrumentor(extend(defaultOptions(), (options || {})));
return instrumentor.instrument(ast);
}


function SourceInstrumentor (options) {
function Instrumentor (options) {
ensureOptionPrerequisites(options);
this.options = options;
}

SourceInstrumentor.prototype.instrument = function (ast) {
Instrumentor.prototype.instrument = function (ast) {
ensureAstPrerequisites(ast, this.options);
var that = this,
assertionPath,
Expand Down Expand Up @@ -213,11 +213,11 @@
return result;
};

SourceInstrumentor.prototype.isCalleeOfTargetAssertion = function (node) {
Instrumentor.prototype.isCalleeOfTargetAssertion = function (node) {
return numberOfTargetArguments(node, this.options) !== 0;
};

SourceInstrumentor.prototype.isTargetAssertionArgument = function (parentNode, currentNode) {
Instrumentor.prototype.isTargetAssertionArgument = function (parentNode, currentNode) {
var numTargetArgs, indexOfCurrentArg;
numTargetArgs = numberOfTargetArguments(parentNode.callee, this.options);
if (numTargetArgs === 0) {
Expand All @@ -227,7 +227,7 @@
return (indexOfCurrentArg < numTargetArgs);
};

SourceInstrumentor.prototype.captureAssertion = function (node, canonicalCode, lineNum) {
Instrumentor.prototype.captureAssertion = function (node, canonicalCode, lineNum) {
var n = newNodeWithLocationCopyOf(node),
props = [];
addLiteralTo(props, n, 'content', canonicalCode);
Expand All @@ -254,7 +254,7 @@
});
};

SourceInstrumentor.prototype.captureNode = function (target, relativeEsPath) {
Instrumentor.prototype.captureNode = function (target, relativeEsPath) {
var n = newNodeWithLocationCopyOf(target);
return n({
type: syntax.CallExpression,
Expand Down

0 comments on commit 8f86e94

Please sign in to comment.