"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=parseNewTree;var _parse=_interopRequireDefault(require("../util/parse"));var _create=_interopRequireDefault(require("../tree/create"));var _transaction=_interopRequireDefault(require("../transaction"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}/**
 * @param {Transaction} transaction
 */function parseNewTree(transaction){const{state,input,config:options}=transaction;const{measure}=state;if(typeof input==="string"){measure("parsing input for new tree");const{childNodes}=(0,_parse.default)(input,undefined,options);const vTree=(0,_create.default)(childNodes);if(vTree){transaction.newTree=vTree}measure("parsing input for new tree")}}module.exports=exports.default;