aboutsummaryrefslogtreecommitdiff
path: root/crates/sloth_vm/src/sloth_std/term.rs
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-04-18 10:42:45 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-04-18 10:42:45 -0500
commitaf02ccd056754c60131d13d74b9fac0e23b2af31 (patch)
tree16b041a84a65f2b285192f79e774b15327885bf9 /crates/sloth_vm/src/sloth_std/term.rs
parent38b564380a6362a82a0e5269b1e7e3d3635900e7 (diff)
downloadsloth-af02ccd056754c60131d13d74b9fac0e23b2af31.tar.gz
Added more documentation in the native functions
Diffstat (limited to 'crates/sloth_vm/src/sloth_std/term.rs')
-rw-r--r--crates/sloth_vm/src/sloth_std/term.rs11
1 files changed, 9 insertions, 2 deletions
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 (<x>, <y>)\n\tExample: `term_setpos(5, 17); # Sets the position of the \
+ cursor to (5, 17)`",
+ ),
};