mirror of
https://github.com/arkorty/ExprEvalplusplus.git
synced 2026-03-18 00:57:18 +00:00
Commit details: - Refactor the Abstract Syntax Tree (AST) node hierarchy in `main.cxx` for improved memory management and ownership semantics. - Introduce smart pointers (`std::unique_ptr`) for managing ownership of AST nodes, eliminating manual memory management. - Add getter functions to access operands in Unary and Binary nodes. - Implemente functions to release ownership of operands in Unary and Binary nodes. - Replace manual deletion of operands in the destructor with default virtual destructors for Unary and Binary nodes. - Add a conditional compilation block (`#ifdef ENABLE_TESTS`) to enable testing functionality. - Create a test expression in the `runTest` function to evaluate a complex mathematical expression. - Enable test execution using the `--run-test` command-line option. - Provide a help message for the main program, outlining available options.
9.4 KiB
9.4 KiB