Skip to content

Commit 1520128

Browse files
Make dummy compile function
1 parent 9cf87c1 commit 1520128

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎src/compiler/compiler.cpp‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
#include "compiler.hpp"
22
#include "tokenizer.hpp"
3+
#include "../logging.hpp"
34
#include <fstream>
45

56
ExitCode compile(const CliArgs &args)
67
{
78
std::ifstream stream(args.target);
8-
// auto tokens = tokenize(std::move(stream));
9+
Tokenizer *tokenizer = new Tokenizer(stream);
10+
11+
tokenizer->parse();
12+
auto tokens = tokenizer->close();
13+
delete tokenizer;
14+
15+
log("Compiler", "Compiled {:d} tokens", tokens.get()->size());
16+
return ExitCode::Ok;
917
}

0 commit comments

Comments
 (0)