Implement a proper request tokenizer

This commit is contained in:
2025-11-24 14:18:30 +09:00
parent 181b437b80
commit abc1fcc01b
136 changed files with 883 additions and 365 deletions

View File

@@ -1,5 +1,6 @@
use crate::{
Request,
request_tokenizer::RequestTokenizer,
commands::{
Command, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError,
},
@@ -17,7 +18,7 @@ impl Command for DeleteId {
format!("{} {}", Self::COMMAND, request)
}
fn parse_request(mut parts: std::str::SplitWhitespace<'_>) -> RequestParserResult<'_> {
fn parse_request(mut parts: RequestTokenizer<'_>) -> RequestParserResult<'_> {
let id = parts.next().ok_or(RequestParserError::UnexpectedEOF)?;
let id = id
.parse()