Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Comment.js 878B

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _constants = require("../constants");
  7. var _Node = _interopRequireDefault(require("./Node"));
  8. var _Range = _interopRequireDefault(require("./Range"));
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. class Comment extends _Node.default {
  11. constructor() {
  12. super(_constants.Type.COMMENT);
  13. }
  14. /**
  15. * Parses a comment line from the source
  16. *
  17. * @param {ParseContext} context
  18. * @param {number} start - Index of first character
  19. * @returns {number} - Index of the character after this scalar
  20. */
  21. parse(context, start) {
  22. this.context = context;
  23. const offset = this.parseComment(start);
  24. this.range = new _Range.default(start, offset);
  25. return offset;
  26. }
  27. }
  28. exports.default = Comment;