Started implementing AST

This commit is contained in:
Pasha Bibko
2025-07-22 22:25:20 +01:00
parent 75f84539bd
commit faf34661fb
6 changed files with 57 additions and 4 deletions

35
ast/inc/Node.h Normal file
View File

@@ -0,0 +1,35 @@
#include <LXC.h>
namespace LXC::AST
{
enum class NodeType
{
// General nodes //
Identifier,
Operation,
// Variable nodes //
Var_Declare,
Var_Assign,
Var_Access,
// Control flow nodes //
IfBranch,
ReturnVal
};
class Node
{
public:
Node(NodeType _type)
: m_Type(_type)
{}
protected:
const NodeType m_Type;
};
}