Sha256: 3c2d45f7b81a8f1a2291fe6ec67b9ac3818aa0b0e818788d7d35a48f97c469d8

Contents?: true

Size: 1.17 KB

Versions: 23

Compression:

Stored size: 1.17 KB

Contents

import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/inherits";
import { Type } from '../constants';
import Node from './Node';
import Range from './Range';

var Comment = /*#__PURE__*/function (_Node) {
  _inherits(Comment, _Node);

  function Comment() {
    _classCallCheck(this, Comment);

    return _possibleConstructorReturn(this, _getPrototypeOf(Comment).call(this, Type.COMMENT));
  }
  /**
   * Parses a comment line from the source
   *
   * @param {ParseContext} context
   * @param {number} start - Index of first character
   * @returns {number} - Index of the character after this scalar
   */


  _createClass(Comment, [{
    key: "parse",
    value: function parse(context, start) {
      this.context = context;
      var offset = this.parseComment(start);
      this.range = new Range(start, offset);
      return offset;
    }
  }]);

  return Comment;
}(Node);

export { Comment as default };

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trusty-cms-5.0.7 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.6 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.5 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.4 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.3 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.2 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.1 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.3.5 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-5.0.0 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.3.4 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.3.3 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.3.2 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.3.1 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.3 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.2.3 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.2.2 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.2.1 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.2 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.1.9 node_modules/yaml/browser/dist/cst/Comment.js
trusty-cms-4.1.8 node_modules/yaml/browser/dist/cst/Comment.js