Skip to content

Refactor - #9

Merged
sentomk merged 7 commits into
mainfrom
refactor
Nov 30, 2025
Merged

sentomk merged 7 commits into
mainfrom
refactor

Conversation

@sentomk

@sentomk sentomk commented Nov 30, 2025

Copy link
Copy Markdown
Owner

feat: restructure pattern library with v0.5.0 architecture

Major refactoring of the pattern matching library:

  • Reorganized header structure into logical modules (base, pattern, meta)
  • Simplified pattern hierarchy with new base classes and traits
  • Updated namespace from ptn::pattern to ptn::pat for brevity
  • Refactored value and type pattern implementations
  • Enhanced match engine with improved otherwise handler logic
  • Updated project version to 0.5.0 to reflect breaking changes
  • Removed outdated benchmark files
  • Fixed CMake configuration paths

sentomk and others added 7 commits November 28, 2025 02:22
Restructure the core pattern matching components from DSL-based layout
to a more organized engine architecture. Changes include:

- Replace match_builder with engine/builder and engine/match modules
- Add forward declarations header (fwd.h)
- Move implementation details to engine/detail subdirectory
- Remove legacy dsl/case_expr and dsl/operators headers

This improves code organization by separating builder and match
functionality while maintaining a clearer separation between
interface and implementation details.
Reorganized the core module's namespace structure from ptn::dsl to ptn::core::dsl for better logical grouping. Added new common headers (diagnostics, eval, optimize, common_traits) to the CMakeLists installation. Updated namespaces in case_expr.hpp and operators.hpp files. Removed NAMESPACE export from CMake configuration. This refactoring improves code organization and clarifies the module hierarchy.
Move pattern-related traits (pattern_like concept, is_pattern, binding_args) from common_traits.hpp to the pattern/base/fwd.h module. This reorganization improves code modularity by placing pattern-specific abstractions in their dedicated module, reducing coupling between common utilities and pattern implementations. Updated references in diagnostics.hpp and common_traits.hpp to use the new location.
Update pattern matching to pass the subject as the first argument to handlers by concatenating it with bound arguments using tuple_cat. This change requires modifications to type traits to reflect the new invocation signature and enhances the pattern matching consistency across different handler types.
- Reorganize headers into logical modules: base/, meta/, pattern/, core/
- Update project version from 0.4.1 to 0.5.0
- Refactor namespace structure from ptn::pattern to ptn::pat
- Move pattern base classes to dedicated pattern/base/ directory
- Consolidate meta utilities into base/, dsa/, and query/ subdirectories
- Remove benchmark_complex.cpp and update benchmark includes
- Fix CMake configuration for proper install paths
@sentomk
sentomk merged commit d03fe0c into main Nov 30, 2025
16 checks passed
sentomk added a commit that referenced this pull request Mar 11, 2026
* refactor: initialize

* refactor(core): reorganize core layer into engine architecture

Restructure the core pattern matching components from DSL-based layout
to a more organized engine architecture. Changes include:

- Replace match_builder with engine/builder and engine/match modules
- Add forward declarations header (fwd.h)
- Move implementation details to engine/detail subdirectory
- Remove legacy dsl/case_expr and dsl/operators headers

This improves code organization by separating builder and match
functionality while maintaining a clearer separation between
interface and implementation details.

* refactor(core): reorganize namespace structure and headers

Reorganized the core module's namespace structure from ptn::dsl to ptn::core::dsl for better logical grouping. Added new common headers (diagnostics, eval, optimize, common_traits) to the CMakeLists installation. Updated namespaces in case_expr.hpp and operators.hpp files. Removed NAMESPACE export from CMake configuration. This refactoring improves code organization and clarifies the module hierarchy.

* refactor: relocate pattern traits to pattern/base module

Move pattern-related traits (pattern_like concept, is_pattern, binding_args) from common_traits.hpp to the pattern/base/fwd.h module. This reorganization improves code modularity by placing pattern-specific abstractions in their dedicated module, reducing coupling between common utilities and pattern implementations. Updated references in diagnostics.hpp and common_traits.hpp to use the new location.

* refactor(core): include subject in handler invocation args

Update pattern matching to pass the subject as the first argument to handlers by concatenating it with bound arguments using tuple_cat. This change requires modifications to type traits to reflect the new invocation signature and enhances the pattern matching consistency across different handler types.

* refactor: reorganize header structure and update namespaces

- Reorganize headers into logical modules: base/, meta/, pattern/, core/
- Update project version from 0.4.1 to 0.5.0
- Refactor namespace structure from ptn::pattern to ptn::pat
- Move pattern base classes to dedicated pattern/base/ directory
- Consolidate meta utilities into base/, dsa/, and query/ subdirectories
- Remove benchmark_complex.cpp and update benchmark includes
- Fix CMake configuration for proper install paths

* fix: add missing include to eval.hpp
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