Skip to content

Conversation

xav-db
Copy link
Member

@xav-db xav-db commented Sep 5, 2025

Description

implementing major parser refactor and code tidy up which I think was much needed. also resolved or removed many of the old todos

Related Issues

Closes #426 #425 #423

Checklist when merging to main

  • No compiler warnings (if applicable)
  • Code is formatted with rustfmt
  • No useless or dead code (if applicable)
  • Code is easy to understand
  • Doc comments are used for all functions, enums, structs, and fields (where appropriate)
  • All tests pass
  • Performance has not regressed (assuming change was not to fix a bug)
  • Version number has been updated in helix-cli/Cargo.toml and helixdb/Cargo.toml

Additional Notes

@xav-db xav-db marked this pull request as ready for review September 5, 2025 12:10
@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 12:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a major parser refactor for the HelixQL language compiler, reorganizing the codebase for better maintainability and resolving numerous TODO items. The changes consolidate parser functionality into specialized modules and update import paths throughout the analyzer and generator components.

  • Major reorganization of the parser module structure from helix_parser to organized sub-modules
  • Resolution and removal of TODO comments throughout the codebase
  • Import path updates across analyzer, generator, and CLI components to use the new module structure

Reviewed Changes

Copilot reviewed 65 out of 71 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
helix-db/src/helixc/parser/mod.rs Complete restructure with new module organization and main parsing logic
helix-db/src/helixc/parser/types.rs Large new file containing all AST type definitions (958 lines)
helix-db/src/helixc/parser/utils.rs New utility functions for common parsing operations
helix-db/src/helixc/parser/parser_methods.rs Updated import path from old module structure
helix-db/src/helixc/analyzer/ Multiple files with import path updates and TODO resolution
helix-db/src/helixc/generator/ Multiple files with import path updates and code cleanup
helix-db/src/helix_engine/ Various files with updated method calls and TODO removal

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

&self,
pair: Pair<Rule>,
) -> Result<Vec<Expression>, ParserError> {
println!("pair: {pair:?}");
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Debug print statement should be removed from production code as it can affect performance and clutter logs.

Suggested change
println!("pair: {pair:?}");

Copilot uses AI. Check for mistakes.

}
(FieldType::Date, value) => match value {
Value::String(date) => {
println!("date: {}, {:?}", date, date.parse::<NaiveDate>());
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code as they can affect performance and clutter logs.

Copilot uses AI. Check for mistakes.

) => true,
(FieldType::Boolean, DefaultValue::Boolean(_)) => true,
(FieldType::Date, DefaultValue::String(date)) => {
println!("date: {}, {:?}", date, date.parse::<NaiveDate>());
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code as they can affect performance and clutter logs.

Suggested change
println!("date: {}, {:?}", date, date.parse::<NaiveDate>());

Copilot uses AI. Check for mistakes.

_ => false,
},
l => {
println!("l: {l:?}");
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Debug print statement should be removed from production code as it can affect performance and clutter logs.

Copilot uses AI. Check for mistakes.

) -> Result<bool, GraphError> {
let val = match &self.inner.next() {
Some(Ok(TraversalValue::Value(val))) => {
println!("value : {val:?}");
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code as they can affect performance and clutter logs.

Copilot uses AI. Check for mistakes.

Some(Err(err)) => Err(GraphError::from(err.to_string())),
None => Ok(default),
};
println!("result: {val:?}");
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

Debug print statements should be removed from production code as they can affect performance and clutter logs.

Suggested change
println!("result: {val:?}");

Copilot uses AI. Check for mistakes.

@xav-db xav-db self-assigned this Sep 6, 2025
@xav-db xav-db merged commit 2153a11 into dev Sep 6, 2025
13 checks passed
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.

2 participants