mirror of
https://github.com/avinal/The-VM-to-HACK-Translator.git
synced 2026-01-11 07:38:33 +05:30
made slight changes
This commit is contained in:
15
parser.cpp
15
parser.cpp
@@ -75,4 +75,19 @@ void parser::parse()
|
||||
std::vector<vmcommand> parser::get_commands()
|
||||
{
|
||||
return this->parsed;
|
||||
}
|
||||
|
||||
bool parser::change_file(std::string name)
|
||||
{
|
||||
this->parsed.clear();
|
||||
this->input_file = name;
|
||||
|
||||
if (this->parsed.size() == 0 && input_file == name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user