lib/kg/kg-4.2.0/compiler.js
function (tplContent, name) {
    if (tplContent) {
      var ret;
      try {
        ret = parser.parse(tplContent, name);
      } catch (err) {
        var e;
        if (err instanceof Error) {
          e = err;
        } else {
          e = new Error(err);
        }
        var errorStr = 'XTemplate error ';
        e.stack = errorStr + e.stack;
        e.message = errorStr + e.message;
        throw e;
      }
      return ret;
    } else {
      return {
        statements: []
      };
    }
  }
function (tplContent, name) {
    if (tplContent) {
      var ret;
      try {
        ret = parser.parse(tplContent, name);
      } catch (err) {
        var e;
        if (err instanceof Error) {
          e = err;
        } else {
          e = new Error(err);
        }
        var errorStr = 'XTemplate error ';
        e.stack = errorStr + e.stack;
        e.message = errorStr + e.message;
        throw e;
      }
      return ret;
    } else {
      return {
        statements: []
      };
    }
  }
function ( tplContent , name ) { if ( tplContent ) { var ret ; try { ret = parser . parse ( tplContent , name ) ; } catch ( err ) { var e ; if ( err instanceof Error ) { e = err ; } else { e = new Error ( err ) ; } var errorStr = 'XTemplate error ' ; e . stack = errorStr + e . stack ; e . message = errorStr + e . message ; throw e ; } return ret ; } else { return { statements : [ ] } ; } }
get ast of template
@param {String} [name] xtemplate name
@param {String} tplContent
@return {Object}
get ast of template