Skip to content

Modularity#143

Draft
halotukozak wants to merge 12 commits intomasterfrom
modularity
Draft

Modularity#143
halotukozak wants to merge 12 commits intomasterfrom
modularity

Conversation

@halotukozak
Copy link
Copy Markdown
Owner

@halotukozak halotukozak commented Dec 18, 2025

AI-Generated Description

Modularity

This pull request introduces significant improvements to the modularity, type safety, and clarity of the lexer and parser components, alongside enhancements to context manipulation and debugging utilities. The changes aim to simplify code structure, improve maintainability, and ensure better type inference across the project.

Key Changes

  • Refactoring: Improved type safety and inference in lexer, parser, and context manipulation components.
  • Simplified Token Definitions: Enhanced clarity and reduced complexity in defining token types used by the lexer and parser.
  • Debugging Enhancements: Expanded DebugSettings and related utilities for better traceability and debugging support.
  • Code Cleanup: Reverted certain changes and streamlined functionality across multiple files to ensure consistency.
  • Configuration Updates: Minor updates to .scalafmt.conf and build.mill for formatting and build improvements.

Technical Details

  • Added type-safe refinements in Lexer.scala, reducing ambiguity and improving readability (+123/-95).
  • Expanded DebugPosition.scala with new functionality (+35/-0) for detailed debug tracking.
  • Simplified internal utilities such as Showable.scala (+26/-18) and UnsafeExtensions.scala (+20/-15) for better modular design.
  • Refined Default.scala and Empty.scala, improving default behaviors and reducing redundant code (+35/-19, +7/-4 respectively).
  • Adjusted debugUtils.scala (-39 lines) to streamline debugging-related operations.
  • Total changes: 429 additions and 329 deletions across 30 files.

These updates enhance modularity and maintainability while improving clarity and functionality in key components.


Statistics

  • 30 files changed
  • 429 additions
  • 329 deletions

@halotukozak halotukozak self-assigned this Dec 18, 2025
@halotukozak halotukozak added the experimental MR with experimental Scala feature application label Dec 21, 2025
…t handling across lexer, parser, and utilities
# Conflicts:
#	src/alpaca/internal/Default.scala
#	src/alpaca/internal/lexer/Lexer.scala
#	src/alpaca/internal/lexer/Token.scala
#	src/alpaca/internal/lexer/Tokenization.scala
#	src/alpaca/lexer.scala
#	test/src/alpaca/ParserApiTest.scala
#	thesis/src/out/alpaca.pdf
@halotukozak halotukozak marked this pull request as draft January 1, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build enhancement New feature or request experimental MR with experimental Scala feature application Lexer Parser refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant