From af02ccd056754c60131d13d74b9fac0e23b2af31 Mon Sep 17 00:00:00 2001 From: nic-gaffney Date: Tue, 18 Apr 2023 10:42:45 -0500 Subject: Added more documentation in the native functions --- crates/sloth_vm/src/sloth_std/term.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'crates/sloth_vm/src/sloth_std/term.rs') diff --git a/crates/sloth_vm/src/sloth_std/term.rs b/crates/sloth_vm/src/sloth_std/term.rs index 41e6708..16fd86a 100644 --- a/crates/sloth_vm/src/sloth_std/term.rs +++ b/crates/sloth_vm/src/sloth_std/term.rs @@ -11,7 +11,10 @@ pub const TERM_CLEAR: NativeFunction = NativeFunction { }, arity: 0, returns_value: false, - doc: None, + doc: Some( + "NativeFunction term_clear: \n\tdesc: Clears the terminal\n\tExample: `term_clear(); # \ + Clears the terminal`", + ), }; fn term_setpos(_vm: &mut VM, args: &[Primitive]) -> NativeFunctionResult { @@ -30,5 +33,9 @@ pub const TERM_SETPOS: NativeFunction = NativeFunction { function: term_setpos, arity: 2, returns_value: false, - doc: None, + doc: Some( + "NativeFunction term_setpos: \n\targs: x (int), y (int)\n\tdesc: Sets the cursors \ + position to (, )\n\tExample: `term_setpos(5, 17); # Sets the position of the \ + cursor to (5, 17)`", + ), }; -- cgit v1.2.3