Documentation

Lapis.VFS.PieceTable

Buffer Identifier #

Identifies which buffer a piece points to

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Piece Descriptor #

      A piece describes a contiguous range of text in one of the buffers

      Instances For
        Equations
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Lapis.VFS.PieceTable.Piece.fromText (buffer : Buffer) (start : Nat) (text : String) :

            Create a piece from text content, computing metrics

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Create an empty piece

              Equations
              Instances For

                Check if piece is empty

                Equations
                Instances For

                  Pieces are measurable for the finger tree

                  Equations

                  Text Buffers #

                  The two text buffers backing the piece table

                  Instances For

                    Create buffers from initial document content

                    Equations
                    Instances For

                      Get text for a piece from the appropriate buffer

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Append text to the add buffer, returning new buffers and the start position

                        Equations
                        Instances For

                          Piece Table State #

                          The complete piece table state using a finger tree of pieces

                          Instances For

                            Create a piece table from initial content

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              Get the total byte length

                              Equations
                              Instances For

                                Get the total line count

                                Equations
                                Instances For

                                  Get the total UTF-16 length

                                  Equations
                                  Instances For

                                    Get text in a byte range

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      @[irreducible]
                                      def Lapis.VFS.PieceTable.PieceTableState.getTextByteRange.getTextByteRangeAux (pieces : Array Piece) (buffers : TextBuffers) (startByte endByte idx currentByte : Nat) (result : String) :
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        Insert text at a byte position - O(log n)

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          Delete text in a byte range - O(log n)

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            Replace text in a byte range - O(log n)

                                            Equations
                                            Instances For

                                              Piece Coalescing #

                                              Compact the piece table by merging adjacent same-buffer pieces

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Equations
                                                Instances For