code: function (start, type, limit, canBeEscaped) {
              /*23456*/
              var startL = start.length,
                  startPos = i + startL,
                  pos = source.indexOf(limit, startPos);
              lineBuffer = line;
              if (canBeEscaped) {
                  while (pos !== -1 && isEscaped(pos)) {
                      pos = source.indexOf(limit, pos + 1);
                  }
              }
              bufferType = type;
              if (pos === -1) {
                  buffer = start + source.substr(startPos);
              } else {
                  buffer = start + source.substr(startPos, pos - startPos) + limit;
              }
              line += countNewLines(buffer);
              emitBuffer();
              
          	//If limit is not found, set i to the position of the end of the buffered characters
              if(pos === -1){
              	i = i + buffer.length;
              }else{
              	i = pos + limit.length - 1;
              }
          }
docs: Split given source into PHP tokens + original by: Marco Marchiò + improved by: Brett Zamir (http://brett-zamir.me) - depends on: token_name % note 1: Token numbers depend on the PHP version % note 2: token_name is only necessary for a non-standard php.js-specific use of this function; % note 2: if you define an object on this.php_js.phpParser (where "this" is the scope of the % note 2: token_get_all function (either a namespaced php.js object or the window object)), % note 2: this function will call that object's methods if they have the same names as the tokens, % note 2: passing them the string, line number, and token number (in that order) * example 1: token_get_all('/'+'* comment *'+'/'); * returns 1: [[310, '/* comment */', 1]] Token to number conversion