Skip to content

Conversation

@LeanSerra
Copy link
Owner

@LeanSerra LeanSerra commented Oct 28, 2025

Description

This PR refactors the code in src/grammar/rules_actions.rs to use let ast = &mut compiler_context.ast; as it reduced some noise added by having to use compiler_context.ast for every interaction with the AST

It removes some functions for push|pop out of the expression and term stacks as those fields are now public to be consistent with the way we use the other AST stacks

It also wraps the repeated code for log_error_and_exist into log_ast_error function

Copy link
Collaborator

@MatiBarcia MatiBarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from feat/compiler_builtins to main October 29, 2025 01:02
@LeanSerra LeanSerra marked this pull request as ready for review October 29, 2025 01:02
@LeanSerra LeanSerra merged commit 113610b into main Oct 29, 2025
2 checks passed
@LeanSerra LeanSerra deleted the feat/ast_cleanup branch October 29, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants