소스 검색

Add comments

xuty 3 년 전
부모
커밋
7a1fdd8f6d
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      lib/src/core/buffer/range.dart

+ 8 - 0
lib/src/core/buffer/range.dart

@@ -20,10 +20,18 @@ abstract class BufferRange {
 
   BufferRange get normalized;
 
+  /// Convert this range to segments of single lines.
   Iterable<BufferSegment> toSegments();
 
+  /// Returns true if the given[position] is within this range.
   bool contains(CellOffset position);
+
+  /// Returns the smallest range that contains both this range and the given
+  /// [range].
   BufferRange merge(BufferRange range);
+
+  /// Returns the smallest range that contains both this range and the given
+  /// [position].
   BufferRange extend(CellOffset position);
 
   @override