NodeIf
| 1718 | |
| 1719 | // NodeIf |
| 1720 | NodeIf::NodeIf(const token_vector &expr, uint32_t line) |
| 1721 | : NodeParent(line) |
| 1722 | , m_expr(expr) |
| 1723 | , m_else_if(nullptr) |
| 1724 | , m_if_type(NODE_TYPE_IF) |
| 1725 | { |
| 1726 | if (expr[0].get_type() == token_type_t::ELIF_TOKEN) |
| 1727 | { |
| 1728 | m_if_type = NODE_TYPE_ELIF; |
| 1729 | } |
| 1730 | else if (expr[0].get_type() == token_type_t::ELSE_TOKEN) |
| 1731 | { |
| 1732 | m_if_type = NODE_TYPE_ELSE; |
| 1733 | } |
| 1734 | } |
| 1735 | |
| 1736 | NodeType NodeIf::gettype() |
| 1737 | { |