chore remove dead code (bullet_kind, starts_with_ci, peek_token)

- Remove unused bullet_kind type from lexer.ml - Remove unused starts_with_ci from prescan.ml - Remove unused peek_token and incorrect let _ = starts_at suppression (starts_at IS used by is_planning_line)

Commit
a4a1b472129d6b7e42e2ae7f80271cf12e0c6d6e
Author
Kiro (high) <noreply@kiro.dev>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/lexer.ml
index 805e06ef..d3763b86 100644..100644
@@ -9,11 +9,6 @@
9 9 The lexer operates line-by-line. Each call to [next_token]
10 10 returns the classification of the next line. *)
11 11
12 Removed: (** The bullet type for list items. *)
13 Removed: type bullet_kind =
14 Removed: | Bullet_unordered of char (** '-', '+', or '*' *)
15 Removed: | Bullet_ordered of string * char (** counter, ')' or '.' *)
16 Removed:
17 12 (** A raw list item token payload. *)
18 13 type list_item_data = {
19 14 lid_indent : int;
@@ -512,13 +507,6 @@
512 507 classify_line st line
513 508 end
514 509
515 Removed: (** Peek at the next token without consuming it. *)
516 Removed: let peek_token st =
517 Removed: if st.line_idx >= Array.length st.lines then Eof
518 Removed: else
519 Removed: let line = st.lines.(st.line_idx) in
520 Removed: classify_line st line
521 Removed:
522 510 (** Tokenize the entire input into a list of (token, line_number) pairs.
523 511 Useful for testing and for feeding Menhir. *)
524 512 let tokenize ~config input =
@@ -531,6 +519,3 @@
531 519 | _ -> loop ((tok, ln) :: acc)
532 520 in
533 521 loop []
534 Removed:
535 Removed: let _ = starts_at (* suppress warning if unused directly *)
536 Removed: let _ = peek_token
lib/prescan.ml
index 2d33cc7a..223a241f 100644..100644
@@ -5,12 +5,6 @@
5 5 These declarations may appear anywhere in the file and affect
6 6 how headings are interpreted. *)
7 7
8 Removed: (** Check if a string starts with a prefix (case-insensitive). *)
9 Removed: let starts_with_ci prefix s =
10 Removed: let plen = String.length prefix in
11 Removed: String.length s >= plen
12 Removed: && String.uppercase_ascii (String.sub s 0 plen) = String.uppercase_ascii prefix
13 Removed:
14 8 (** Strip leading whitespace from a string. *)
15 9 let lstrip s =
16 10 let len = String.length s in