-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor AST structure & fix parser memory crash for array operations
- Refactored `ASTNode` to separate fields for distinct node types, preventing memory conflicts. - Updated parser functions to use correct `ASTNodeType` for declarations and assignments. - Fixed crash in `print_ast` caused by uninitialized or overlapping fields. - Ensured proper memory initialization using calloc for zero-initialized nodes. - Enhanced debugging and error handling for better resilience against invalid memory access. #175
- Loading branch information
1 parent
133ac17
commit e2c4590
Showing
5 changed files
with
120 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.