"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index = require("../micromark-util-combine-extensions/index.cjs");
const content = require("./lib-initialize-content.cjs");
const document = require("./lib-initialize-document.cjs");
const flow = require("./lib-initialize-flow.cjs");
const text = require("./lib-initialize-text.cjs");
const constructs = require("./lib-constructs.cjs");
const createTokenizer = require("./lib-create-tokenizer.cjs");
function parse(options) {
  const settings = options || {};
  const constructs$1 = (
    /** @type {FullNormalizedExtension} */
    index.combineExtensions([constructs, ...settings.extensions || []])
  );
  const parser = {
    constructs: constructs$1,
    content: create(content.content),
    defined: [],
    document: create(document.document),
    flow: create(flow.flow),
    lazy: {},
    string: create(text.string),
    text: create(text.text)
  };
  return parser;
  function create(initial) {
    return creator;
    function creator(from) {
      return createTokenizer.createTokenizer(parser, initial, from);
    }
  }
}
exports.parse = parse;
//# sourceMappingURL=lib-parse.cjs.map
