From b3f83360282bfe327c0ccbeecab706e0e7d2c050 Mon Sep 17 00:00:00 2001 From: Cori Barker Date: Mon, 9 Feb 2026 11:59:14 +0000 Subject: Changed .h to .hpp --- include/parser/ast_node.h | 70 ----------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 include/parser/ast_node.h (limited to 'include/parser/ast_node.h') diff --git a/include/parser/ast_node.h b/include/parser/ast_node.h deleted file mode 100644 index 710054d..0000000 --- a/include/parser/ast_node.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef AST_NODE_H -#define AST_NODE_H - -#include "parser/node_type.h" - -#include -#include -#include - -class ASTNode { -public: - int line; - int column; - - virtual ~ASTNode() = default; -}; - -class Program : public ASTNode { -public: - std::vector> declarations; -}; - -class Declaration : public ASTNode { -public: - std::string type; - std::string var_name; - std::unique_ptr value; - - Declaration(std::string type, std::string var_name, std::unique_ptr value = nullptr) : type(type), var_name(var_name), value(std::move(value)) {} -}; - -class Assignment : public ASTNode { -public: - std::string variable_name; - std::unique_ptr value; - - Assignment(std::string var, std::unique_ptr val) : variable_name(var), value(std::move(val)) {} -}; - -class NumberLiteral : public ASTNode { -public: - double value; - - NumberLiteral(double val) : value(val) {} -}; - -class StringLiteral : public ASTNode { -public: - std::string value; - - StringLiteral(std::string val) : value(val) {} -}; - -class Identifier : public ASTNode { -public: - std::string name; - - Identifier(std::string name) : name(name) {} -}; - -class BinaryOp : public ASTNode { -public: - std::unique_ptr left; - std::string value; - std::unique_ptr right; - - BinaryOp(std::unique_ptr left, std::string value, std::unique_ptr right) : left(std::move(left)), value(std::move(value)), right(std::move(right)) {} -}; - -#endif -- cgit v1.2.3