MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / invoke_string_method

Method invoke_string_method

aiscript-vm/src/builtins/mod.rs:54–69  ·  view source on GitHub ↗
(
        &self,
        mc: &'gc Mutation<'gc>,
        name: InternedString<'gc>,
        receiver: Value<'gc>,
        args: Vec<Value<'gc>>,
    )

Source from the content-addressed store, hash-verified

52 }
53
54 pub fn invoke_string_method(
55 &self,
56 mc: &'gc Mutation<'gc>,
57 name: InternedString<'gc>,
58 receiver: Value<'gc>,
59 args: Vec<Value<'gc>>,
60 ) -> Result<Value<'gc>, VmError> {
61 if let Some(f) = self.string.get(&name) {
62 f(mc, receiver, args)
63 } else {
64 Err(VmError::RuntimeError(format!(
65 "Unknown string method: {}",
66 name
67 )))
68 }
69 }
70
71 pub fn invoke_array_method(
72 &self,

Callers 1

invokeMethod · 0.80

Calls 2

RuntimeErrorClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected