Added parser project

This commit is contained in:
Pasha Bibko
2025-07-23 19:33:33 +01:00
parent 6a534ba635
commit 86a178b7d5
10 changed files with 93 additions and 30 deletions

View File

@@ -1,3 +1,5 @@
#pragma once
#include <LXC.h>
namespace LXC::AST
@@ -55,6 +57,15 @@ namespace LXC::AST
{}
};
// Typedefs for easier use with the AST //
typedef std::unique_ptr<Node> NodePtr;
typedef std::unique_ptr<NodeValue> NodeValuePtr;
typedef std::vector<NodePtr> SyntaxBranch;
typedef std::vector<NodeValuePtr> ValueList;
// Will be replaced later to account for things like namespaces //
typedef std::string Identifier;
// Returns a pointer to the actual type of the node //
template<typename T>
requires std::is_base_of_v<Node, T>