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

Method parse_term

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

Source from the content-addressed store, hash-verified

431 self.parse_expr()?;
432 self.skip_ws();
433 self.expect(b')')?;
434 return Ok(());
435 }
436 if let Some(n) = self.parse_number() {
437 self.ops.push(Op::Const(n));
438 return Ok(());
439 }
440
441 let ident = self.parse_ident().ok_or(CompileError::UnexpectedToken)?;
442 self.skip_ws();
443
444 if ident == "params" && self.eat(b'[') {
445 self.parse_expr()?;
446 self.skip_ws();
447 self.expect(b']')?;
448 self.ops.push(Op::Param);
449 return Ok(());
450 }
451

Callers 1

parse_exprMethod · 0.80

Calls 4

parse_powerMethod · 0.80
eatMethod · 0.80
skip_wsMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected