position.js 320 B

1234567891011121314
  1. 'use strict';
  2. var define = require('define-property');
  3. /**
  4. * Store position for a node
  5. */
  6. module.exports = function Position(start, parser) {
  7. this.start = start;
  8. this.end = { line: parser.line, column: parser.column };
  9. define(this, 'content', parser.orig);
  10. define(this, 'source', parser.options.source);
  11. };