packages/jstr/index.js
function parse(html, script, filePath){
  var m, index = 0;//the index in the html string
  while(m = reDelim.exec(html)) {
    addLiteral(script, html.slice(index, m.index));//string
    addCode(script, m, filePath);
    index = m.index + m[0].length;
  }
  addLiteral(script, html.slice(index));
  script.push('\n}return __r.join("");');
  script = script.join('');
  return script;
}
function parse(html, script, filePath){
  var m, index = 0;//the index in the html string
  while(m = reDelim.exec(html)) {
    addLiteral(script, html.slice(index, m.index));//string
    addCode(script, m, filePath);
    index = m.index + m[0].length;
  }
  addLiteral(script, html.slice(index));
  script.push('\n}return __r.join("");');
  script = script.join('');
  return script;
}
function parse ( html , script , filePath ) { var m , index = 0 ; //the index in the html string
 while ( m = reDelim . exec ( html ) ) { addLiteral ( script , html . slice ( index , m . index ) ) ; //string
 addCode ( script , m , filePath ) ; index = m . index + m [ 0 ] . length ; } addLiteral ( script , html . slice ( index ) ) ; script . push ( '\n}return __r.join("");' ) ; script = script . join ( '' ) ; return script ; }
parse the html string to js script
parse the html string to js script