"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsonSerializer = require("./lib-serializer-json-serializer.cjs");
const cstUtils = require("./lib-utils-cst-utils.cjs");
class DefaultCommentProvider {
  constructor(services) {
    this.grammarConfig = () => services.parser.GrammarConfig;
  }
  getComment(node) {
    var _a;
    if (jsonSerializer.isAstNodeWithComment(node)) {
      return node.$comment;
    }
    return (_a = cstUtils.findCommentNode(node.$cstNode, this.grammarConfig().multilineCommentRules)) === null || _a === void 0 ? void 0 : _a.text;
  }
}
exports.DefaultCommentProvider = DefaultCommentProvider;
//# sourceMappingURL=lib-documentation-comment-provider.cjs.map
