Add brief headers to new files

uport
Alex Rea 8 years ago
parent 30a2292a00
commit 41a3e4a8ca
  1. 2
      injector.js
  2. 3
      instrumenter.js
  3. 3
      parse.js

@ -1,5 +1,7 @@
const injector = {};
// These functions are used to actually inject the instrumentation events.
injector.callEvent = function injectCallEvent(contract, fileName, injectionPoint) {
const linecount = (contract.instrumented.slice(0, injectionPoint).match(/\n/g) || []).length + 1;
contract.runnableLines.push(linecount);

@ -1,5 +1,8 @@
const instrumenter = {};
// These functions work out where in an expression we can inject our
// instrumenation events.
function createOrAppendInjectionPoint(contract, key, value) {
if (contract.injectionPoints[key]) {
contract.injectionPoints[key].push(value);

@ -1,6 +1,9 @@
const parse = {};
const instrumenter = require('./instrumenter');
// All the functions in this file do is walk the AST and call the instrumenter
// functions where appropriate, which determine where to inject events.
// Assign a dummy function to everything we might see in the AST
['AssignmentExpression',
'BinaryExpression',

Loading…
Cancel
Save