Skip to content

Conversation

@LunaStev
Copy link
Member

@LunaStev LunaStev commented Jan 10, 2026

This PR focuses on code hygiene and maintenance as the project reaches version 0.1.6-pre-beta. It performs a comprehensive cleanup across all crates, removing unused imports, redundant logic, and unreachable code to improve maintainability and reduce compiler warnings.

Key Changes

1. Version Update

  • Version Bump: Updated Cargo.toml to 0.1.6-pre-beta across the workspace.

2. Lexer & Parser Hygiene

  • Lexer: Removed unnecessary super::common::* imports in core.rs, ident.rs, and scan.rs that were leftovers from the recent modularization.
  • Parser Implementation:
    • Deleted duplicate parsing logic in expr/assign.rs and format.rs, consolidating the implementation into the new modular structure.
    • Resolved numerous "unused import" warnings in expr/ submodules (binary.rs, helpers.rs, mod.rs, postfix.rs, primary.rs, unary.rs).
    • Cleaned up redundant dependencies in parser/decl.rs and parser/stmt.rs.

3. LLVM Codegen Refinements

  • Imports: Removed unused AddressSpace and other redundant imports in expression/lvalue.rs, statement/variable.rs, llvm_codegen/ir.rs, and llvm_codegen/types.rs.
  • Code Cleanup:
    • Removed unreachable panic! branches in types.rs that were superseded by the new type coercion system.
    • Stripped redundant comments and "TODO" markers that have already been addressed in statement/io.rs and statement/variable.rs.

Impact

  • Maintenance: Significant reduction in compiler warnings during the build process.
  • Readability: Cleaner source files with only necessary dependencies and comments.
  • Consistency: Ensures the codebase is aligned with the latest modular architecture without legacy baggage.

Clean up the codebase by removing unused imports, dead code, and redundant comments.

Changes:
- **Parser**:
  - Removed unused imports (`Token`, `TokenType`) from multiple parser modules where they were not needed.
  - Deleted unused `parse_asm_value` helper function.
  - Cleaned up commented-out code and Korean comments in `decl.rs`, `functions.rs`, and `io.rs`.
- **Lexer**:
  - Removed redundant `pub use common::*;` in `core.rs` and `scan.rs`.
- **Codegen**:
  - Removed unused `AddressSpace` import in `statement/variable.rs`.
  - Deleted panic branches for unreachable code in `wave_type_to_llvm_type`.
  - Removed Korean comments in `statement/io.rs`.
- **General**:
  - Bumped version to `0.1.6-pre-beta`.
  - Standardized import grouping across modules.

This maintenance commit improves code quality and reduces compiler warnings.

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev LunaStev self-assigned this Jan 10, 2026
@LunaStev LunaStev changed the title refactor: organize imports and remove unused code refactor: update version and cleanup warnings Jan 10, 2026
@LunaStev LunaStev changed the title refactor: update version and cleanup warnings refactor: bump version to 0.1.6 and cleanup unused imports Jan 10, 2026
@LunaStev LunaStev merged commit f769f26 into wavefnd:master Jan 10, 2026
2 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.

1 participant