Im vonfused

This commit is contained in:
Pasha Bibko
2025-04-22 22:32:07 +01:00
parent 8e1fa45a44
commit 099e543e95
8 changed files with 100 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
#include <AST.h>
namespace LX
{
std::string ToString(std::unique_ptr<AST::Node>& node)
{
if (node == nullptr) { return "NULL Node"; }
switch (node->m_Type)
{
case AST::Node::IDENTIFIER: return "IDENTIFIER";
case AST::Node::OPERATION: return "OPERATION";
case AST::Node::RETURN_STATEMENT: return "return";
case AST::Node::NUMBER_LITERAL: return "number";
}
}
}