code: private TextToken text(Token prev) {
      int startIndex = curCharIndex;
  
      while (curChar != '{' && curChar != EOF) {
        consume();
      }
      return new TextToken(prev, curCharIndex - startIndex);
    }
docs: Consumes and returns a token for a sequence of text.