aboutsummaryrefslogtreecommitdiff
path: root/crates/sloth_vm/src/sloth_std/term.rs
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-04-27 17:19:54 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-04-27 17:19:54 -0500
commitac8c9abab30d66ff208a623d0a6de8869373a554 (patch)
tree8d2d20d9a5312a1e2fad73d9a6ee7294b0c27dc2 /crates/sloth_vm/src/sloth_std/term.rs
parent757e804671ef3dcb2e0f1295e385780b5feae2ca (diff)
parentaf02ccd056754c60131d13d74b9fac0e23b2af31 (diff)
downloadsloth-ac8c9abab30d66ff208a623d0a6de8869373a554.tar.gz
Merge branch 'standard-library' of github.com-Nic:slothlang/sloth into standard-library
Diffstat (limited to 'crates/sloth_vm/src/sloth_std/term.rs')
-rw-r--r--crates/sloth_vm/src/sloth_std/term.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/sloth_vm/src/sloth_std/term.rs b/crates/sloth_vm/src/sloth_std/term.rs
index cffa1e8..16fd86a 100644
--- a/crates/sloth_vm/src/sloth_std/term.rs
+++ b/crates/sloth_vm/src/sloth_std/term.rs
@@ -11,6 +11,10 @@ pub const TERM_CLEAR: NativeFunction = NativeFunction {
},
arity: 0,
returns_value: false,
+ 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 {
@@ -29,4 +33,9 @@ pub const TERM_SETPOS: NativeFunction = NativeFunction {
function: term_setpos,
arity: 2,
returns_value: false,
+ 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)`",
+ ),
};