Skip to content

Conversation

@LunaStev
Copy link
Member

This PR introduces a comprehensive cleanup of the codebase to improve maintainability and ensure consistent coding standards. It focuses on automated formatting, silencing non-critical lint warnings, and applying idiomatic Rust improvements. No functional logic or behavioral changes are included.

Key Changes

  1. Code Formatting:

    • Applied rustfmt project-wide to standardize indentation, bracing, and multi-line function signatures.
    • Fixed several instances of No newline at end of file.
  2. Lint Management:

    • Added module-level #![allow(...)] attributes to lexer, parser, and llvm_temporary modules.
    • This suppresses warnings for dead_code, unused_variables, and specific Clippy lints (e.g., type_complexity, collapsible_if) to reduce noise during the current development phase.
  3. Idiomatic Rust Refactoring:

    • Character Checks: Replaced .is_digit(10) with .is_ascii_digit() and .is_digit(16) with .is_ascii_hexdigit() for better performance and clarity.
    • Iterators: Simplified .lines().nth(0) to .lines().next().
    • Imports: Reorganized and grouped use statements across all impacted files.
    • Error Messages: Refactored eprintln! and panic! calls in the lexer and parser to follow a more consistent format.
  4. Refactoring for Readability:

    • Updated complex match arms and long if-let chains into more readable multi-line blocks.
    • Standardized the internal helper methods and token creation logic.

- Reformat all source files using rustfmt for consistent indentation and code style.
- Add comprehensive lint suppression blocks (#![allow(...)]) to lexer, parser, and llvm_temporary modules to ignore dead code and specific clippy warnings.
- Reorganize and clean up imports across the project.
- Refactor minor logic for better idiomatic Rust (e.g., replacing `is_digit(10)` with `is_ascii_digit()` and `nth(0)` with `next()`).
- Update match arms and multi-line function calls for improved readability.

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev LunaStev self-assigned this Dec 20, 2025
@LunaStev LunaStev merged commit c54f084 into wavefnd:master Dec 20, 2025
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