#include #include #include namespace LXC::AST { // Will be replaced later to account for things like namespaces // typedef std::string Identifier; // Foward declares so it can be used in VarDecl // class VarAssignment; class FunctionCall final : public NodeValue { public: FunctionCall(Identifier& functionName, std::vector>& arguments); private: // The name of the function // Identifier m_FuncName; // The arguments of the function // std::vector> m_Arguments; }; class IntLiteral final : public NodeValue { public: IntLiteral(std::string& value); private: // Yes numbers are stored as strings // std::string m_NumberValue; }; class Operation final : public NodeValue { public: Operation(std::unique_ptr& left, Lexer::Token::TokenType operand, std::unique_ptr& right); private: // The sides of the operation // std::unique_ptr m_Lhs, m_Rhs; // The operand of the operation // Lexer::Token::TokenType m_Operand; }; class VarDeclaration final : public Node { public: VarDeclaration(Identifier& name); VarDeclaration(Identifier& name, std::unique_ptr& value); private: // The name of the variable // Identifier m_Name; // Default value of the variable (nullable) // std::unique_ptr m_Value; }; class VarAssignment final : public Node { public: VarAssignment(Identifier& name, std::unique_ptr& value); private: // The name of the variable // Identifier m_Name; // Value to assign to the variable // std::unique_ptr m_Value; }; class VarAccess final : public NodeValue { public: VarAccess(Identifier& name); private: // The name of the variable // Identifier m_Name; }; class IfBranch final : public Node { public: IfBranch(std::unique_ptr& condition, std::vector>& body); private: // The condition of the branch // std::unique_ptr m_Condition; // The body of the if-statement // std::vector> m_Body; }; class ReturnStatement final : public Node { public: ReturnStatement(std::unique_ptr& value); private: // The value to return (nullable) // std::unique_ptr m_ReturnValue; }; }