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

Function parse_text_param

perro_source/core/perro_animation/src/panim/events.rs:167–172  ·  view source on GitHub ↗
(value: &str, line_no: usize)

Source from the content-addressed store, hash-verified

165}
166
167fn parse_text_param(value: &str, line_no: usize) -> Result<AnimationParam, String> {
168 if let Some(rest) = value.strip_prefix('@') {
169 return parse_reference_param(rest, line_no);
170 }
171 Ok(AnimationParam::String(Cow::Owned(value.to_string())))
172}
173
174fn parse_reference_param(rest: &str, line_no: usize) -> Result<AnimationParam, String> {
175 let Some((object, field)) = rest.split_once('.') else {

Callers 1

parse_paramFunction · 0.85

Calls 1

parse_reference_paramFunction · 0.85

Tested by

no test coverage detected