added skeleton for parsing
This commit is contained in:
parent
1b8115ef23
commit
7c6379c62d
7 changed files with 123 additions and 0 deletions
20
simulator_SIC_XE/src/code.cpp
Normal file
20
simulator_SIC_XE/src/code.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "code.h"
|
||||
|
||||
void Code::addLine(const std::shared_ptr<Node> &line)
|
||||
{
|
||||
_lines.emplace_back(line);
|
||||
}
|
||||
|
||||
const std::vector<std::shared_ptr<Node>> &Code::getLines() const
|
||||
{
|
||||
return _lines;
|
||||
}
|
||||
|
||||
const string Code::toString() const
|
||||
{
|
||||
string result;
|
||||
for (const auto& line : _lines) {
|
||||
result += line->toString() + "\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue