Skip to content

refactor: split the command parser by command family - #418

Merged
kacy merged 1 commit into
mainfrom
refactor/split-command-parser
Sep 24, 2026
Merged

kacy merged 1 commit into
mainfrom
refactor/split-command-parser

Conversation

@kacy

@kacy kacy commented Sep 24, 2026

Copy link
Copy Markdown
Owner

ember-protocol/src/command/parse.rs held every command's parser in about 3,800 lines. It is now a directory:

  • parse/mod.rs has Command::from_frame, which picks a parser by command name, plus the shared helpers for pulling strings and numbers out of frames, and the SCAN and score-bound parsers several families use.
  • One file per family: strings, keys, lists, sorted_sets, hashes, sets, server, cluster, pubsub, vector and proto. The largest is about 500 lines.

The functions moved unchanged. The family parsers became pub(super) so from_frame can call them, and the // --- x commands --- section comments were dropped because the file names now do that job. The protocol tests pass unchanged.

command/parse.rs held every command parser in 3,800 lines. The parsers
now live in one file per family under command/parse/, and parse/mod.rs
keeps from_frame and the shared argument helpers. No code changed.
@kacy
kacy merged commit 31f0fff into main Sep 24, 2026
12 checks passed
@kacy
kacy deleted the refactor/split-command-parser branch September 24, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant