(
&mut self,
start_line: usize,
frame: u32,
key_mode: AnimationKeyMode,
object_types: &HashMap<String, NodeType>,
)
| 189 | Err(format!( |
| 190 | "line {}: missing closing `[/Objects]` block", |
| 191 | start_line |
| 192 | )) |
| 193 | } |
| 194 | |
| 195 | fn parse_frame_block( |
| 196 | &mut self, |
| 197 | start_line: usize, |
| 198 | frame: u32, |
| 199 | key_mode: AnimationKeyMode, |
| 200 | object_types: &HashMap<String, NodeType>, |
| 201 | ) -> Result<Vec<FrameAction>, String> { |
| 202 | let mut actions = Vec::new(); |
| 203 | |
| 204 | while let Some((line_no, line)) = self.next_line() { |
| 205 | let line = strip_comment(line).trim(); |
| 206 | if line.is_empty() { |
| 207 | continue; |
| 208 | } |
| 209 | if is_frame_footer(line) { |
| 210 | return Ok(actions); |
| 211 | } |
| 212 | |
| 213 | if line.starts_with('@') { |
| 214 | if line.ends_with('{') { |
| 215 | actions.extend(self.parse_object_block( |
| 216 | line_no, |
| 217 | frame, |
| 218 | key_mode, |
| 219 | line, |
| 220 | object_types, |
| 221 | )?); |
| 222 | continue; |
| 223 | } |
| 224 | if line.ends_with('}') { |
| 225 | actions.extend(self.parse_inline_object_block( |
| 226 | line_no, |
| 227 | frame, |
| 228 | key_mode, |
| 229 | line, |
| 230 | object_types, |
| 231 | )?); |
| 232 | continue; |
no test coverage detected