diff options
Diffstat (limited to 'libalee/corewords.hpp')
-rw-r--r-- | libalee/corewords.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libalee/corewords.hpp b/libalee/corewords.hpp index 33f4fc5..5798f59 100644 --- a/libalee/corewords.hpp +++ b/libalee/corewords.hpp @@ -22,19 +22,28 @@ #include "types.hpp" #include "state.hpp" +/** + * To be implemented by the user, this function is called when the `sys` word + * is executed. + */ void user_sys(State&); class CoreWords { public: constexpr static std::size_t WordCount = 33; - - constexpr static Cell Immediate = (1 << 5); - constexpr static int Semicolon = 26; + /** + * Finds execution token that corresponds to the given word. + * Returns -1 if not found. + */ static int findi(const char *); static int findi(State&, Word); + + /** + * Executes the given CoreWord execution token using the given state. + */ static void run(unsigned int, State&); constexpr static char wordsarr[] = |