Sha256: ed45051b010f60d8f423d18f15ba5af29ae48efdd8da3e42a5362631bca48403

Contents?: true

Size: 819 Bytes

Versions: 8

Compression:

Stored size: 819 Bytes

Contents

"use strict";

// istanbul ignore next

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

var _utilLocation = require("../util/location");

var _index = require("./index");

var _index2 = _interopRequireDefault(_index);

var pp = _index2["default"].prototype;

// This function is used to raise exceptions on parse errors. It
// takes an offset integer (into the current `input`) to indicate
// the location of the error, attaches the position to the end
// of the error message, and then raises a `SyntaxError` with that
// message.

pp.raise = function (pos, message) {
  var loc = _utilLocation.getLineInfo(this.input, pos);
  message += " (" + loc.line + ":" + loc.column + ")";
  var err = new SyntaxError(message);
  err.pos = pos;
  err.loc = loc;
  throw err;
};

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
ilog-0.4.1 node_modules/babylon/lib/parser/location.js
ilog-0.4.0 node_modules/babylon/lib/parser/location.js
ilog-0.3.3 node_modules/babylon/lib/parser/location.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/babylon/lib/parser/location.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/babylon/lib/parser/location.js
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/babylon/lib/parser/location.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/babylon/lib/parser/location.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/babylon/lib/parser/location.js