aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2025-05-21 07:45:30 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2025-05-21 07:45:30 +0200
commit5a90102b20d18966b69496d85361d14c085479db (patch)
treec44f7c89f84841131f248fbaf2f85bca13517c2f /src
parent40cccdb7cc472ee6300c25e1774a8489e9107f6a (diff)
downloadimp-5a90102b20d18966b69496d85361d14c085479db.tar.gz
imp-5a90102b20d18966b69496d85361d14c085479db.zip
syntax doc
Diffstat (limited to 'src')
-rw-r--r--src/driver.c2
-rw-r--r--src/repl.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/driver.c b/src/driver.c
index 60d3ce2..fc2a3ae 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
fprintf(stderr,
"Usage: %s [-i program.imp]\n"
" -i <program.imp> interpret program and exit\n"
- " (no args) start REPL\n",
+ " (no args) start REPL\n",
argv[0]);
return (opt == 'h') ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/src/repl.c b/src/repl.c
index 9c61b98..5ea9792 100644
--- a/src/repl.c
+++ b/src/repl.c
@@ -7,14 +7,14 @@
#include <string.h>
static void print_help(void) {
- puts(
- "IMP REPL (type IMP statements or commands starting with '%')\n"
+ printf(
+ "IMP REPL (type IMP statements or commands starting with '%%')\n"
"Commands:\n"
- " %quit exit\n"
- " %run <path/to/file.imp> interpret program\n"
- " %set <var> <val> set variable\n"
- " %print [<var>] print variable, or all variables\n"
- " %help show this message\n");
+ " %%quit exit\n"
+ " %%run <path/to/file.imp> interpret program\n"
+ " %%set <var> <val> set variable\n"
+ " %%print [<var>] print variable, or all variables\n"
+ " %%help show this message\n");
}
static void repl_exec_command(hashmap_t context, const char *command) {