Skip to content

Commit

Permalink
create empty parsing function
Browse files Browse the repository at this point in the history
  • Loading branch information
BigPeet committed Feb 20, 2021
1 parent 81024ad commit 132c68e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
4 changes: 4 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ if [[ -d ./.clangd ]]; then
rm -rf ./.clangd
fi

if [[ -d ./.cache ]]; then
rm -rf ./.cache
fi

if [[ -L compile_commands.json ]]; then
rm compile_commands.json
fi
8 changes: 6 additions & 2 deletions lib/gamelog/include/gamelog/gamelog.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#ifndef GAMELOG_H_INCLUDE
#define GAMELOG_H_INCLUDE

#include <string>

namespace gl {
int Foo(int x);
}

void Parse(std::string const& file_name);

} // namespace gl

#endif /* ifndef GAMELOG_H_INCLUDE */
9 changes: 4 additions & 5 deletions lib/gamelog/src/gamelog.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include <string>

#include "gamelog/gamelog.h"

namespace gl {

int Foo(int x)
{
return 2 * x;
}
void Parse(std::string const& ) {}

}
} // namespace gl
16 changes: 13 additions & 3 deletions src/file_parser/src/file_parser.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#include <iostream>

#include "gamelog/gamelog.h"

int main()
int main(int argc, char* const* argv)
{
int x = gl::Foo(2);
return x;
if (argc != 2)
{
std::cout << "This executabel takes exactly one argument.\n";
std::cout << "Usage: file_parser FILE_PATH\n";
return 0;
}

gl::Parse(argv[1]);

return 0;
}

0 comments on commit 132c68e

Please sign in to comment.