var SolidityUtils = {
  getCharacterOffsetToLineAndColumnMapping: function(source) {
    var mapping = [];

    source = source.split("");

    var line = 0;
    var column = 0;

    source.forEach(function(character) {
      if (character === "\n") {
        line += 1;
        column = -1;

        mapping.push({
          line: line,
          column: 0
        });
      } else {
        mapping.push({
          line: line,
          column: column
        });
      }

      column += 1;
    });

    return mapping;
  },

  getHumanReadableSourceMap: function(sourceMap) {
    var map = sourceMap.split(";");

    var last = {};

    return map.map(function(current) {
      var ret = {
        start: last.start,
        length: last.length,
        file: last.file,
        jump: last.jump
      };

      current = current.split(":");

      if (current[0] && current[0] !== "-1" && current[0].length) {
        ret.start = parseInt(current[0]);
      }
      if (current[1] && current[1] !== "-1" && current[1].length) {
        ret.length = parseInt(current[1]);
      }
      if (current[2] /*&& current[2] !== '-1'*/ && current[2].length) {
        ret.file = parseInt(current[2]);
      }
      if (current[3] && current[3].length) {
        ret.jump = current[3];
      }

      last = ret;

      return ret;
    });
  }
};

module.exports = SolidityUtils;

@@ -1,12 +1,61 @@
+var debug = require(%22debug%22)(%22solidity-utils%22);%0A%0A
 var Solidity
@@ -627,23 +627,34 @@
 ) %7B%0A    
-var map
+const instructions
  = sourc
@@ -679,312 +679,535 @@
     
-var last = %7B%7D;%0A%0A    return map.map(function(current) %7B%0A      var ret = %7B%0A        start: last.start,%0A        length: last.length,%0A        file: last.file,%0A        jump:
+let processedInstruction = %7B%7D; //persists across instructions for when info doesn't change%0A    let processedSourceMap = %5B%5D;%0A%0A    //JS doesn't have scan, so we'll do this scan manually%0A    for (let instruction of instructions) %7B%0A      let splitInstruction = instruction.split(%22:%22);%0A%0A      //note: if(splitInstruction%5Bi%5D) checks both that there are%0A      //at
  l
+e
 ast
-.jump%0A      %7D;%0A%0A      current = current.split(%22:%22);%0A%0A      if (current%5B0%5D && current%5B0%5D !== %22-1%22 && current%5B0%5D.length) %7B%0A        ret
+ that many fields, and that that particular field%0A      //is nonempty%0A%0A      if (splitInstruction%5B0%5D && splitInstruction%5B0%5D !== %22-1%22) %7B%0A        processedInstruction
 .sta
@@ -1220,23 +1220,32 @@
 arseInt(
-current
+splitInstruction
 %5B0%5D);%0A  
@@ -1242,32 +1242,33 @@
 on%5B0%5D);%0A      %7D%0A
+%0A
       if (curren
@@ -1265,77 +1265,91 @@
 if (
-current%5B1%5D && current%5B1%5D !== %22-1%22 && current%5B1%5D.length) %7B%0A        ret
+splitInstruction%5B1%5D && splitInstruction%5B1%5D !== %22-1%22) %7B%0A        processedInstruction
 .len
@@ -1363,23 +1363,32 @@
 arseInt(
-current
+splitInstruction
 %5B1%5D);%0A  
@@ -1385,32 +1385,33 @@
 on%5B1%5D);%0A      %7D%0A
+%0A
       if (curren
@@ -1408,81 +1408,59 @@
 if (
-current%5B2%5D /*&& current%5B2%5D !== '-1'*/ && current%5B2%5D.length) %7B%0A        ret
+splitInstruction%5B2%5D) %7B%0A        processedInstruction
 .fil
@@ -1472,23 +1472,32 @@
 arseInt(
-current
+splitInstruction
 %5B2%5D);%0A  
@@ -1502,16 +1502,17 @@
       %7D%0A
+%0A
       if
@@ -1517,126 +1517,356 @@
 if (
-current%5B3%5D && current%5B3%5D.length) %7B%0A        ret.jump = current%5B3%5D;%0A      %7D%0A%0A      last = ret;%0A%0A      return ret;%0A    %7D)
+splitInstruction%5B3%5D) %7B%0A        processedInstruction.jump = splitInstruction%5B3%5D;%0A      %7D%0A%0A      if (splitInstruction%5B4%5D) %7B%0A        processedInstruction.modifierDepth = parseInt(splitInstruction%5B4%5D);%0A      %7D%0A%0A      processedSourceMap.push(%7B ...processedInstruction %7D); //need to clone so they won't all be copies!%0A    %7D%0A%0A    return processedSourceMap
 ;%0A  

Update solidity-utils for modifier depth