use alloc::string::ToString;
use super::super::{
delta::DeltaBatch,
state::{ParserState, SectionKind},
};
use super::LineProcessor;
impl LineProcessor {
pub(super) fn process_script_info_line(line: &str) -> DeltaBatch<'static> {
let trimmed = line.trim();
if let Some(colon_pos) = trimmed.find(':') {
let _key = trimmed[..colon_pos].trim();
let _value = trimmed[colon_pos + 1..].trim();
}
DeltaBatch::new()
}
pub(super) fn process_styles_line(&mut self, line: &str) -> DeltaBatch<'static> {
let trimmed = line.trim();
if let Some(format_str) = trimmed.strip_prefix("Format:") {
let format_str = format_str.trim().to_string();
self.context.set_styles_format(format_str);
} else if trimmed.starts_with("Style:") {
}
DeltaBatch::new()
}
pub(super) fn process_events_line(&mut self, line: &str) -> DeltaBatch<'static> {
let trimmed = line.trim();
if let Some(format_str) = trimmed.strip_prefix("Format:") {
let format_str = format_str.trim().to_string();
self.context.set_events_format(format_str);
return DeltaBatch::new();
}
if trimmed.starts_with("Dialogue:") || trimmed.starts_with("Comment:") {
self.state.enter_event(SectionKind::Events);
}
DeltaBatch::new()
}
pub(super) fn process_binary_line(line: &str) -> DeltaBatch<'static> {
let trimmed = line.trim();
if trimmed.contains(':') {
} else {
}
DeltaBatch::new()
}
pub(super) fn process_event_continuation(
&mut self,
line: &str,
section: SectionKind,
_fields_seen: usize,
) -> DeltaBatch<'static> {
let trimmed = line.trim();
if !trimmed.is_empty() {
}
self.state = ParserState::InSection(section);
DeltaBatch::new()
}
}