Remove main from c++ template
This commit is contained in:
parent
a6cf6b7372
commit
48ed58f077
|
@ -88,19 +88,3 @@ char {{name}}::peek() {
|
||||||
std::size_t {{name}}::getByteOffset() {
|
std::size_t {{name}}::getByteOffset() {
|
||||||
return m_offset;
|
return m_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Temporary main
|
|
||||||
int main(int argc, char** argv) {
|
|
||||||
std::istringstream in(argv[1]);
|
|
||||||
{{name}} lex(in);
|
|
||||||
try {
|
|
||||||
while (true)
|
|
||||||
std::cout << "Match: " << lex.nextToken().content << std::endl;
|
|
||||||
}
|
|
||||||
catch ({{name}}::NoMoreTokens& err) {
|
|
||||||
std::cout << "DONE, read " << lex.getByteOffset() << " bytes." << std::endl;
|
|
||||||
}
|
|
||||||
catch ({{name}}::NoMatch& err) {
|
|
||||||
std::cout << "No match, " << lex.getByteOffset() << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue