From 58301861a345bde8f7df395a2ddf55730ea2faa2 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 31 Jan 2016 00:41:30 -0500 Subject: [PATCH] shell testing. --- mpw-shell.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mpw-shell.cpp b/mpw-shell.cpp index 31f8b04..e9c6a8a 100644 --- a/mpw-shell.cpp +++ b/mpw-shell.cpp @@ -68,13 +68,21 @@ int main(int argc, char **argv) { phase1 p1; phase2 p2; + p1 >>= p2; + + p2 >>= [](command_ptr &&ptr) { + printf("command: %d\n", ptr->type); + ptr->execute(); + }; + /* p1 >>= [&p2](std::string &&s) { fprintf(stdout, " -> %s\n", s.c_str()); p2.process(s); }; - + */ read_stdin(p1); + p2.finish(); /* try {