src/parser/parser.js
function (text) {
      var tree = []

      if (this.parseEmbeddedVars) {
        var re = /([$][\w@]+)|`([^`]*)`/
        for (var found = re.exec(text); found; found = re.exec(text)) {
          tree.push({type: 'text', data: text.slice(0, found.index)})
          var d = this.parseExpression(found[1] ? found[1] : found[2])
          tree.push(d.tree)
          text = text.slice(found.index + found[0].length)
        }
      }
      tree.push({type: 'text', data: text})
      return tree
    }
function (text) {
      var tree = []

      if (this.parseEmbeddedVars) {
        var re = /([$][\w@]+)|`([^`]*)`/
        for (var found = re.exec(text); found; found = re.exec(text)) {
          tree.push({type: 'text', data: text.slice(0, found.index)})
          var d = this.parseExpression(found[1] ? found[1] : found[2])
          tree.push(d.tree)
          text = text.slice(found.index + found[0].length)
        }
      }
      tree.push({type: 'text', data: text})
      return tree
    }
function ( text ) { var tree = [ ] if ( this . parseEmbeddedVars ) { var re = / ([$][\w@]+)|`([^`]*)` / for ( var found = re . exec ( text ) ; found ; found = re . exec ( text ) ) { tree . push ( { type : 'text' , data : text . slice ( 0 , found . index ) } ) var d = this . parseExpression ( found [ 1 ] ? found [ 1 ] : found [ 2 ] ) tree . push ( d . tree ) text = text . slice ( found . index + found [ 0 ] . length ) } } tree . push ( { type : 'text' , data : text } ) return tree }
Parse text.
Parse text .