MCPcopy Create free account
hub / github.com/PerroEngine/Perro / parse_header_block

Method parse_header_block

perro_source/core/perro_animation/src/anim_tree.rs:161–176  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

159 }
160
161 fn parse_header_block(&mut self) -> Result<Cow<'static, str>, String> {
162 let mut name = Cow::Borrowed("AnimationTree");
163 loop {
164 if self.consume_close("AnimationTree")? {
165 break;
166 }
167 let key = self.expect_ident()?;
168 self.expect(Token::Equals)?;
169 if key == "name" {
170 name = Cow::Owned(self.expect_text_like()?);
171 } else {
172 self.skip_value()?;
173 }
174 }
175 Ok(name)
176 }
177
178 fn parse_slots_block(&mut self, close_block: &str) -> Result<Vec<AnimationTreeSlot>, String> {
179 let mut slots = Vec::new();

Callers 1

parseMethod · 0.80

Calls 5

consume_closeMethod · 0.80
expect_text_likeMethod · 0.80
skip_valueMethod · 0.80
expect_identMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected