import { findCommentNode } from "../utils/cst-utils.js";
import { isAstNodeWithComment } from "../serializer/json-serializer.js";
var DefaultCommentProvider = class {
	constructor(e) {
		this.grammarConfig = () => e.parser.GrammarConfig;
	}
	getComment(n) {
		return isAstNodeWithComment(n) ? n.$comment : findCommentNode(n.$cstNode, this.grammarConfig().multilineCommentRules)?.text;
	}
};
export { DefaultCommentProvider };
