Conversation
Replaces static inline vectors in expression_node and expression_statement_node with instance member stacks in the parser class. Updates AST node constructors to accept parent pointers, which are now explicitly passed during parsing. This removes global state from the parser, improving reentrancy and architectural soundness.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Addressed the
TODO: static ?comments insource/parse.hby refactoring how the parser tracks current expression and statement contexts.static inline std::vector<expression_node*> current_expressionsfromexpression_node.static inline std::vector<expression_statement_node*> current_expression_statementsfromexpression_statement_node.current_expressionsandcurrent_expression_statementsas instance members of theparserclass.expression_nodeandbinary_expression_nodeconstructors to take an optional parent pointer (e.g.,expression_statement_node const* parentorexpression_node const* parent).parsermethods (expression,expression_statement,binary_expression, andpostfix_expression) to manage the new member stacks and pass the appropriate parent pointers to AST node constructors.Verified the changes by building the project and running regression tests.
PR created automatically by Jules for task 9732352551333987108 started by @jnorthrup