First usable generator source.
Still issues with usage rules and error reporting, but functional.
This commit is contained in:
19
generator/demo/main.cpp
Normal file
19
generator/demo/main.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
{{=@@ @@=}}
|
||||
#include "@@argspec@@ArgGrammarDriver.hpp"
|
||||
#include <sstream>
|
||||
|
||||
using Result = @@argspec@@ArgGrammar::Driver::Result;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
@@argspec@@ArgGrammar::Driver driver{ argc, argv };
|
||||
auto res = driver.parse();
|
||||
|
||||
if (res != Result::success) {
|
||||
if (res == Result::completedAction)
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user