MCPcopy Create free account
hub / github.com/aspizu/goboscript / proc_call

Method proc_call

src/codegen/stmt.rs:391–473  ·  view source on GitHub ↗
(
        &mut self,
        s: S,
        d: D,
        this_id: NodeID,
        name: &SmolStr,
        span: &Span,
        args: &[Expr],
    )

Source from the content-addressed store, hash-verified

389 }
390
391 pub fn proc_call(
392 &mut self,
393 s: S,
394 d: D,
395 this_id: NodeID,
396 name: &SmolStr,
397 span: &Span,
398 args: &[Expr],
399 ) -> io::Result<()> {
400 if name == "log" {
401 return self.proc_call_impl(
402 &Proc::new(
403 "\u{200b}\u{200b}log\u{200b}\u{200b}".into(),
404 span.clone(),
405 vec![Arg::new("arg0".into(), span.clone(), Type::Value, None)],
406 false,
407 ),
408 s,
409 d,
410 this_id,
411 name,
412 span,
413 args,
414 true,
415 );
416 }
417 let Some(proc) = s.sprite.procs.get(name) else {
418 if name == "breakpoint" {
419 return self.proc_call_impl(
420 &Proc::new(
421 "\u{200b}\u{200b}breakpoint\u{200b}\u{200b}".into(),
422 span.clone(),
423 vec![],
424 false,
425 ),
426 s,
427 d,
428 this_id,
429 name,
430 span,
431 args,
432 true,
433 );
434 }
435 if name == "error" {
436 return self.proc_call_impl(
437 &Proc::new(
438 "\u{200b}\u{200b}error\u{200b}\u{200b}".into(),
439 span.clone(),
440 vec![Arg::new("arg0".into(), span.clone(), Type::Value, None)],
441 false,
442 ),
443 s,
444 d,
445 this_id,
446 name,
447 span,
448 args,

Callers 1

stmtMethod · 0.80

Calls 3

newFunction · 0.85
proc_call_implMethod · 0.80
reportMethod · 0.80

Tested by

no test coverage detected