@alanchenchen/cbml-processor
Version:
基于cbml parser和cbml规范实现的构建工具
22 lines (21 loc) • 472 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseCBMLEle = void 0;
const cbml_1 = require("cbml");
/**
* 解析代码片段包含的 CBML 元素
*
* @param code
* @param opts
* @returns CBMLRootEle
*/
const parseCBMLEle = (code, opts) => {
try {
const res = (0, cbml_1.parse)(code, opts);
return res;
}
catch (error) {
throw new Error(error);
}
};
exports.parseCBMLEle = parseCBMLEle;