Commit Graph

2 Commits

Author SHA1 Message Date
Arkaprabha Chakraborty
69bc5b4aa1 Create ast.cxx for AST implementation and tests
Commit details:
- Add new file ast.cxx with ASTNode, Identifier, Divide, Multiply, Subtract, Power classes.
- Include necessary headers and static initialization of variableTable in Identifier class.
- Add a test function runTest() for evaluating a complex expression.
- Add printHelpMessage() function for displaying program usage.
- Update main function to handle "--run-test" argument.
2024-01-22 07:07:30 +05:30
Arkaprabha Chakraborty
7b5eb1e26d Rename main.cxx to ast.hxx
Commit details:
- Rename main.cxx to src/ast.hxx to better reflect its content.
- Update include statements in the renamed file.
- Remove unnecessary include <cstring> statement from ast.hxx.
- Remove redundant implementation of Power::evaluate() in ast.hxx.
2024-01-22 07:06:48 +05:30