Semantic Diff

#9208 Remove dead code from the vendored Flow parser

3 commits

c4bb5029d5639ca39ebdb3489b0f689c6ebea44c..pr-9208

d9b6a65bc · cknitt + Claude · Nov 03, 2026, 19:56 UTC

Remove dead code from the vendored Flow parser

Flow's parser moved to Rust, so the vendored OCaml copy (0.320.0) will never be synced again; it is now pruned like the rest of the repository and make dead-code no longer suppresses compiler/flow_parser.

Removed, about 3,700 lines:

- Unused functions, module-type items and collection helpers, and the [@@deriving show] debug printers. - Parser entry options ReScript never passes: parse options, the token sink and its rollback buffer. - File_key's variants: ReScript parses only strings, so the source of a location is always None and File_key.t is now empty. - Parse_error variants that are never raised. - AST fields the parser fills in but nothing reads: template literal quasi values (quasis are now locations), the records of tolerated syntax in record declarations and match cases (the tokens are still consumed), JSX text payloads and fragment locations, Comment.on_newline, and TSAccessibility comments.

Kept and marked live: Loc.equal, used by the derived Token.equal (ppx references are invisible to reanalyze), and the height field of the partial_node records cast from map and set nodes.

47e5c96b1 · cknitt + Claude · Nov 04, 2026, 05:54 UTC

Remove the never-passed ?loc of Ast_literal.type_bool

The interface declared type_bool with the core_type_lit abbreviation, which hid its optional ?loc from reanalyze; with the abbreviation fix in reanalyze (rescript-lang/reanalyze#224) it is reported: the only caller, bs_builtin_ppx, passes no location.

Before: val type_bool : core_type_lit (?loc:Location.t -> unit -> _) After: val type_bool : unit -> Parsetree.core_type

bd40d1c2f · cknitt + Claude · Nov 04, 2026, 06:33 UTC

Add a changelog fragment for the Flow parser cleanup

The changelog check requires a fragment; this one records the internal change.