Timew: Added dispatch to the 'help' command

This commit is contained in:
Paul Beckingham 2016-03-01 00:32:35 -05:00
parent e507dee0e5
commit ac2c0dded4

View file

@ -26,6 +26,8 @@
#include <cmake.h> #include <cmake.h>
#include <Grammar.h> #include <Grammar.h>
#include <common.h>
#include <commands.h>
#include <LR0.h> #include <LR0.h>
#include <iostream> #include <iostream>
#include <new> #include <new>
@ -85,6 +87,16 @@ int main (int argc, const char** argv)
// TODO Parse rules. // TODO Parse rules.
// TODO Dispatch to commands. // TODO Dispatch to commands.
if (argc > 1)
{
// TODO argv[1] is a command.
if (closeEnough ("help", argv[1], 2))
CmdHelp ();
}
else if (argc == 1)
{
// TODO Default command
}
} }
catch (const std::string& error) catch (const std::string& error)