Skip to content

Commit 13ed511

Browse files
committed
Prune unused vendored Flow parser modules
Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent 9bff59b commit 13ed511

26 files changed

Lines changed: 39 additions & 4453 deletions

compiler/flow_parser/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ call uses an empty-list comparison to retain OCaml 5.0 compatibility. The
2424
Sedlex PPX uses `Ast_helper.Exp.fun_` to generate single-argument functions
2525
with newer ppxlib versions.
2626

27+
Only modules in the dependency closure of ReScript's expression and program
28+
parser entry points are retained. Upstream ESTree translation, JSDoc parsing,
29+
location translation, token translation, and unused collection helpers are
30+
omitted. The core statement, declaration, type, JSX, pattern, comment, and AST
31+
modules remain because the parser connects them transitively and `%raw`
32+
validates both complete JavaScript programs and individual expressions.
33+
2734
Vendored sources are excluded from the repository-wide OCamlformat check so
2835
that they remain comparable with their upstream versions.
2936

compiler/flow_parser/collections/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
(library
44
(name collections)
55
(wrapped false)
6+
(modules Flow_map Flow_set SSet StringKey)
67
(libraries base))

compiler/flow_parser/collections/iMap.ml

Lines changed: 0 additions & 13 deletions
This file was deleted.

compiler/flow_parser/collections/iSet.ml

Lines changed: 0 additions & 14 deletions
This file was deleted.

compiler/flow_parser/collections/immQueue.ml

Lines changed: 0 additions & 54 deletions
This file was deleted.

compiler/flow_parser/collections/immQueue.mli

Lines changed: 0 additions & 37 deletions
This file was deleted.

compiler/flow_parser/collections/intKey.ml

Lines changed: 0 additions & 12 deletions
This file was deleted.

compiler/flow_parser/collections/priorityQueue.ml

Lines changed: 0 additions & 101 deletions
This file was deleted.

compiler/flow_parser/collections/sMap.ml

Lines changed: 0 additions & 13 deletions
This file was deleted.

compiler/flow_parser/collections/union_find.ml

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)