diff --git a/docs/syntax.md b/docs/syntax.md index b1a1a99..e9098df 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -348,6 +348,14 @@ Calls a function. After the function reference, a variable amount of value refer The last argument must be a direct reference which symbolises where to store the function's return value. +#### callmethod &object !methodName $arg1 $arg2 $arg3... &variable + +Calls a method stored inside an object. The object can use the "self" variable to refer to itself, and manipulate its fields. + +The first argument must be a direct reference to the object, and the second argument must be a function reference to the method name. + +The last argument must be a direct reference which symbolises where to store the method's return value. + ### Libraries