-
Bibliothèque uniquement en en-tête
-
Permet d’implémenter simplement un REPL en enregistrant des fonctions comme commandes
register_command(add, "add", "Add two numbers");
register_command(&Arithmetic::inc, "inc", "Increment a number");
→ ajoute les fonctions add et inc comme commandes
[Exemple d’exécution]
help
add Add two numbers
inc Increment a number
help Show this help
add 3 4
7
inc 21
22
add 3 4 5
Error: expected 2 arguments; got 3
Aucun commentaire pour le moment.