blob: 762c7ccac05a2c9d6f3f77c6aabfa1a0b6178d1e [file] [log] [blame]
/*
* Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/
* Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/
*
* Written by Václav Kubernát <kubervac@fit.cvut.cz>
*
*/
#include "ast.hpp"
container_::container_(const std::string& name)
: m_name(name)
{
}
bool container_::operator==(const container_& b) const
{
return this->m_name == b.m_name;
}
bool path_::operator==(const path_& b) const
{
if (this->m_nodes.size() != b.m_nodes.size())
return false;
return this->m_nodes == b.m_nodes;
}
bool cd_::operator==(const cd_& b) const
{
return this->m_path == b.m_path;
}
ParserContext::ParserContext(const CTree& tree)
: m_tree(tree)
{
m_curPath = m_tree.currentNode();
}