parse(file, context) {
		// Note: BOM already removed
		const text = /** @type {string} */ (file.body);

		/*
		 * Check for parsing errors first. If there's a parsing error, nothing
		 * else can happen. However, a parsing error does not throw an error
		 * from this method - it's just considered a fatal error message, a
		 * problem that ESLint identified just like any other.
		 */
		try {
			const options = createParserOptions(
				this.#mode,
				context?.languageOptions,
			);
			const root = fromMarkdown(text, options);

			return {
				ok: true,
				ast: root,
			};
		} catch (ex) {
			return {
				ok: false,
				errors: [ex],
			};
		}
	}
Parses the given file into an AST.
@param {File} file The virtual file to parse.
@param {MarkdownLanguageContext} context The options to use for parsing.
@returns {ParseResult} The result of parsing.