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

Method parse_args

perro_source/core/perro_particle_math/src/lib.rs:551–568  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

549 self.i = start;
550 return None;
551 }
552 let s = std::str::from_utf8(&self.s[start..self.i]).ok()?;
553 s.parse::<f32>().ok()
554 }
555
556 fn eat(&mut self, c: u8) -> bool {
557 self.skip_ws();
558 if self.i < self.s.len() && self.s[self.i] == c {
559 self.i += 1;
560 true
561 } else {
562 false
563 }
564 }
565
566 fn expect(&mut self, c: u8) -> Result<(), CompileError> {
567 if self.eat(c) {
568 Ok(())
569 } else {
570 Err(CompileError::UnexpectedEnd)
571 }

Callers 1

parse_primaryMethod · 0.80

Calls 4

eatMethod · 0.80
parse_exprMethod · 0.80
skip_wsMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected