Skip to content

Refactor file locations#23

Merged
FlickerSoul merged 1 commit intomainfrom
refactor/organize-files
Nov 28, 2025
Merged

Refactor file locations#23
FlickerSoul merged 1 commit intomainfrom
refactor/organize-files

Conversation

@FlickerSoul
Copy link
Owner

This PR organizes source files in a more clear manner.

Copy link

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 reorganizes the BinaryParseKit source files into a more structured directory layout by splitting monolithic extension files into more focused, single-purpose files. The refactoring improves code organization and maintainability by grouping related functionality together.

Key Changes

  • Split BuiltInExtensions.swift into separate integer, Data, and Matchable extension files
  • Split CustomExtensions.swift into separate floating-point extension file
  • Moved PrinterError enum from Printer.swift protocol file into its own dedicated file
  • Created new protocol files (ParsableProtocols.swift, MatchableProtocols.swift, Printable.swift) for better separation of concerns
  • Organized utility functions into dedicated Utils/ directory files

Reviewed changes

Copilot reviewed 8 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Sources/BinaryParseKit/Utils/PrinterUtils.swift New utility file containing printer helper functions for macro system
Sources/BinaryParseKit/Utils/ParsingUtils.swift New utility file with parsing helper functions (matching, type assertions) - header comment needs correction
Sources/BinaryParseKit/Protocols/Printer.swift Removed PrinterError enum (moved to separate file)
Sources/BinaryParseKit/Protocols/Printable.swift New protocol file defining Printable protocol and default implementation
Sources/BinaryParseKit/Protocols/ParsableProtocols.swift New file consolidating all parsing-related protocols - header comment needs correction
Sources/BinaryParseKit/Protocols/MatchableProtocols.swift New protocol file for Matchable protocol and extensions
Sources/BinaryParseKit/Printer/PrinterError.swift New dedicated error file extracted from Printer.swift
Sources/BinaryParseKit/Extensions/PrintableExtensions.swift New file with Printable conformances for integers and floating-point types
Sources/BinaryParseKit/Extensions/Matchable+.swift New extension file for Matchable with RawRepresentable conformance
Sources/BinaryParseKit/Extensions/IntegerExtensions.swift Split from BuiltInExtensions.swift, contains integer parsing extensions - header comment needs correction
Sources/BinaryParseKit/Extensions/FloatingPointExtensions.swift Split from CustomExtensions.swift, contains floating-point parsing extensions - header comment needs correction
Sources/BinaryParseKit/Extensions/Data+SizedParsable.swift Split from BuiltInExtensions.swift, properly imports Foundation
Sources/BinaryParseKit/CustomExtensions.swift Deleted - contents moved to FloatingPointExtensions.swift
Sources/BinaryParseKit/BuiltInExtensions.swift Deleted - contents split into IntegerExtensions.swift, Data+SizedParsable.swift, and Matchable+.swift

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@FlickerSoul FlickerSoul force-pushed the refactor/organize-files branch from 0daf123 to 4091728 Compare November 28, 2025 16:01
@FlickerSoul FlickerSoul force-pushed the refactor/organize-files branch from 4091728 to b6ccc33 Compare November 28, 2025 16:03
@FlickerSoul FlickerSoul enabled auto-merge (squash) November 28, 2025 16:03
@FlickerSoul FlickerSoul merged commit aeffe94 into main Nov 28, 2025
2 checks passed
@FlickerSoul FlickerSoul deleted the refactor/organize-files branch November 28, 2025 16:07
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