Documentation

PrimParser.Text

Length-indexed input text.

structure Text (n : ) :

Input to a parser. n is the number of bytes that haven't been consumed yet.

Instances For
    @[inline]
    def Text.pos {n : } (t : Text n) :
    Equations
    Instances For
      theorem Text.pos_lt {n : } (t : Text (n + 1)) :
      @[inline]
      def Text.head {n : } (t : Text (n + 1)) :
      Equations
      Instances For
        theorem Text.utf8Size_le {n : } {c : Char} (t : Text n) (h : t.bytes.utf8DecodeChar? t.pos = some c) :
        Equations
        Instances For
          Equations
          Instances For
            @[inline]
            def Text.dropTo {n : } (t : Text n) (m : ) (h : m n) :
            Equations
            Instances For
              @[simp]
              theorem Text.dropTo_self {n : } (t : Text n) (h : n n) :
              t.dropTo n h = t
              @[simp]
              theorem Text.dropTo_trans {n m k : } (t : Text n) (h : m n) (h' : k m) :
              (t.dropTo m h).dropTo k h' = t.dropTo k