Refactor main.cpp functions into separate class
This commit is contained in:
22
include/wassembler.hpp
Normal file
22
include/wassembler.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <configuration.hpp>
|
||||
#include <execute/virtualmachine.hpp>
|
||||
#include <preprocessor/preprocessor.hpp>
|
||||
#include <interpret/interpreter.hpp>
|
||||
#include <token/tokenizer.hpp>
|
||||
|
||||
class Wassembler
|
||||
{
|
||||
private:
|
||||
Execute::VirtualMachine vm;
|
||||
|
||||
bool LoadLinesFromFile(std::string const & filePath, std::vector<std::string> & lines) const;
|
||||
bool LoadTokens(std::vector<std::string> const & lines, std::vector<Token::Token> & tokens) const;
|
||||
|
||||
public:
|
||||
bool LoadFromFile(std::string const & filePath);
|
||||
|
||||
void Run();
|
||||
|
||||
Wassembler() = default;
|
||||
};
|
||||
Reference in New Issue
Block a user