UNPKG

587 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3class Line {
4 constructor(document, range) {
5 this.document = document;
6 this.range = range;
7 }
8 getRange() {
9 return this.range;
10 }
11 getTextContent() {
12 return this.document.getText().substring(this.document.offsetAt(this.range.start), this.document.offsetAt(this.range.end));
13 }
14 isAfter(line) {
15 return this.range.start.line > line.range.start.line;
16 }
17 isBefore(line) {
18 return this.range.start.line < line;
19 }
20}
21exports.Line = Line;