Sha256: c44f04fbb9c0a8dc3b0e19a95694af9307ad302742d17f4f6220e450387f035d

Contents?: true

Size: 1.26 KB

Versions: 23

Compression:

Stored size: 1.26 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 Node from './Node';
import Range from './Range';

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

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

    return _possibleConstructorReturn(this, _getPrototypeOf(Alias).apply(this, arguments));
  }

  _createClass(Alias, [{
    key: "parse",

    /**
     * Parses an *alias from the source
     *
     * @param {ParseContext} context
     * @param {number} start - Index of first character
     * @returns {number} - Index of the character after this scalar
     */
    value: function parse(context, start) {
      this.context = context;
      var src = context.src;
      var offset = Node.endOfIdentifier(src, start + 1);
      this.valueRange = new Range(start + 1, offset);
      offset = Node.endOfWhiteSpace(src, offset);
      offset = this.parseComment(offset);
      return offset;
    }
  }]);

  return Alias;
}(Node);

export { Alias 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/Alias.js
trusty-cms-5.0.6 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-5.0.5 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-5.0.4 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-5.0.3 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-5.0.2 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-5.0.1 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.3.5 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-5.0.0 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.3.4 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.3.3 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.3.2 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.3.1 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.3 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.2.3 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.2.2 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.2.1 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.2 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.1.9 node_modules/yaml/browser/dist/cst/Alias.js
trusty-cms-4.1.8 node_modules/yaml/browser/dist/cst/Alias.js