import { combineExtensions } from "../../../../micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js";
import { content } from "./initialize/content.js";
import { document } from "./initialize/document.js";
import { flow } from "./initialize/flow.js";
import { text, string } from "./initialize/text.js";
import * as constructs from "./constructs.js";
import { createTokenizer } from "./create-tokenizer.js";
function parse(options) {
  const settings = options || {};
  const constructs$1 = (
    /** @type {FullNormalizedExtension} */
    combineExtensions([constructs, ...settings.extensions || []])
  );
  const parser = {
    constructs: constructs$1,
    content: create(content),
    defined: [],
    document: create(document),
    flow: create(flow),
    lazy: {},
    string: create(string),
    text: create(text)
  };
  return parser;
  function create(initial) {
    return creator;
    function creator(from) {
      return createTokenizer(parser, initial, from);
    }
  }
}
export {
  parse
};
//# sourceMappingURL=parse.js.map
