aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2024-12-19 17:29:23 -0500
committerClyne Sullivan <clyne@bitgloo.com>2024-12-19 17:29:23 -0500
commitff4e488ca0fd012a4b632bf2f9a775a601c09f67 (patch)
treef5bbfa2eae01dd53371d6dac42114b7c6cd719d5 /main.cpp
parent3246deb437054ff67e600a95d05535251642ad76 (diff)
define type in forth
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index ec2e02c..e51f702 100644
--- a/main.cpp
+++ b/main.cpp
@@ -40,17 +40,12 @@ constinit static sforth::native_word<"U.", [](auto) {
constinit static sforth::native_word<"EMIT", [](auto) {
std::cout << static_cast<char>(forth.pop());
}, &udot> emit;
-constinit static sforth::native_word<"TYPE", [](auto) {
- const unsigned u = forth.pop();
- const auto caddr = reinterpret_cast<const char *>(forth.pop());
- std::cout << std::string_view{caddr, u};
-}, &emit> type;
constinit static sforth::native_word<"INCLUDE", [](auto) {
const auto w = forth.parse();
std::string s {w.begin(), w.end()};
std::ifstream file {s};
parse_stream(forth, file);
-}, &type> incl;
+}, &emit> incl;
int main(int argc, const char *argv[])
{