Sha256: 1b46c93ebe1a0c154f044e4b828007861a22543a7842e4354b5185381a7ef185

Contents?: true

Size: 932 Bytes

Versions: 24

Compression:

Stored size: 932 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _Node = _interopRequireDefault(require("./Node"));

var _Range = _interopRequireDefault(require("./Range"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

class Alias extends _Node.default {
  /**
   * 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
   */
  parse(context, start) {
    this.context = context;
    const {
      src
    } = context;

    let offset = _Node.default.endOfIdentifier(src, start + 1);

    this.valueRange = new _Range.default(start + 1, offset);
    offset = _Node.default.endOfWhiteSpace(src, offset);
    offset = this.parseComment(offset);
    return offset;
  }

}

exports.default = Alias;

Version data entries

24 entries across 24 versions & 2 rubygems

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