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

Method parse_invert_kind

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

Source from the content-addressed store, hash-verified

293 }
294
295 fn parse_invert_kind(&mut self) -> Result<AnimationTreeNodeKind, String> {
296 let mut input = Cow::Borrowed("");
297 let mut mask = AnimationTreeMask::default();
298 loop {
299 if self.consume_close("Invert")? {
300 break;
301 }
302 let key = self.expect_ident()?;
303 self.expect(Token::Equals)?;
304 match key.as_str() {
305 "input" => input = Cow::Owned(self.expect_ref()?),
306 "mask" => mask = self.parse_mask()?,
307 _ => self.skip_value()?,
308 }
309 }
310 Ok(AnimationTreeNodeKind::Invert { input, mask })
311 }
312
313 fn parse_ref_list(&mut self) -> Result<Vec<String>, String> {
314 self.expect(Token::LBracket)?;

Callers 1

Calls 7

consume_closeMethod · 0.80
expect_refMethod · 0.80
parse_maskMethod · 0.80
skip_valueMethod · 0.80
expect_identMethod · 0.45
expectMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected