code: private Token token(Token prev) {
      if (curChar == EOF) {
        return null;
      }
      if (curChar == '{') {
        char nextChar = lookahead();
        if (nextChar == '{') {
          return leftCurlyBracket(prev);
        } else if (nextChar >= 'a' && nextChar <= 'z') {
          return key(prev);
        } else {
          throw new IllegalArgumentException(
              "Unexpected first character '" + nextChar + "'; must be lower case a-z.");
        }
      }
      return text(prev);
    }
docs: Returns the next token from the input pattern, or null when finished parsing.