@ -61,6 +61,8 @@ class Instrumenter {
// First, we run over the original contract to get the source mapping.
let ast = SolidityParser.parse(contract.source, {range: true});
//console.log(JSON.stringify(ast, null, ' '))
parse[ast.type](contract, ast);
const retValue = JSON.parse(JSON.stringify(contract)); // Possibly apotropaic.
@ -185,6 +185,9 @@ parse.SourceUnit = function(contract, expression) {
parse.ReturnStatement = function(contract, expression) {
register.statement(contract, expression);
parse[expression.expression.type] &&
parse[expression.expression.type](contract, expression.expression, true);
};
// TODO:Investigate node structure
@ -159,7 +159,7 @@ describe('logical OR branches', () => {
5: 1,
});
assert.deepEqual(mapping[util.filePath].b, {
1: [ 1, 0 ]
assert.deepEqual(mapping[util.filePath].s, {
1: 1,
@ -182,7 +182,7 @@ describe('logical OR branches', () => {
5: 2,
1: [ 1, 1 ]
1: 2,