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

Function compile_expression

perro_source/core/perro_particle_math/src/lib.rs:388–401  ·  view source on GitHub ↗
(expr: &str)

Source from the content-addressed store, hash-verified

386
387 fn parse_term(&mut self) -> Result<(), CompileError> {
388 self.parse_power()?;
389 loop {
390 self.skip_ws();
391 if self.eat(b'*') {
392 self.parse_power()?;
393 self.ops.push(Op::Mul);
394 } else if self.eat(b'/') {
395 self.parse_power()?;
396 self.ops.push(Op::Div);
397 } else {
398 break;
399 }
400 }
401 Ok(())
402 }
403
404 fn parse_power(&mut self) -> Result<(), CompileError> {

Callers 10

compile_and_eval_worksFunction · 0.85
wgsl_emit_worksFunction · 0.85
hash_function_worksFunction · 0.85
tau_constant_worksFunction · 0.85
parse_pparticle_sourceFunction · 0.85
get_or_compile_exprMethod · 0.85
parse_pparticle_sourceFunction · 0.85

Calls 4

parse_exprMethod · 0.80
as_bytesMethod · 0.45
skip_wsMethod · 0.45
lenMethod · 0.45

Tested by 5

compile_and_eval_worksFunction · 0.68
wgsl_emit_worksFunction · 0.68
hash_function_worksFunction · 0.68
tau_constant_worksFunction · 0.68