Skip to content

Use relaxed lambda syntax#116

Draft
halotukozak wants to merge 7 commits intomasterfrom
relaxed-lambdas
Draft

Use relaxed lambda syntax#116
halotukozak wants to merge 7 commits intomasterfrom
relaxed-lambdas

Conversation

@halotukozak
Copy link
Copy Markdown
Owner

@halotukozak halotukozak commented Nov 20, 2025

AI-Generated Description

Use Relaxed Lambda Syntax

Summary

This PR updates the project to Scala 3.10.1 and refactors the codebase to leverage the relaxed lambda syntax introduced in recent Scala versions. This change improves code readability, reduces verbosity, and aligns the project with modern Scala best practices. Additionally, formatting configurations were updated to ensure consistency with the new syntax.

Key Changes

  • Scala Version Upgrade: Updated the Scala version to 3.10.1.
  • Relaxed Lambda Syntax: Refactored lambda expressions across the codebase to use the relaxed syntax, simplifying method definitions and improving clarity.
  • Formatting Configuration: Updated .scalafmt.conf to support the relaxed lambda syntax and reformatted all files for consistency.
  • Code Cleanup: Minor improvements to code clarity and structure during the refactor.

Technical Details

  • Lambda expressions were updated to the relaxed syntax, which allows omitting explicit parameter lists in cases where they can be inferred.
  • A total of 30 files were modified, with 110 additions and 157 deletions, reflecting the removal of redundant syntax and improved code clarity.
  • Updated .scalafmt.conf to ensure compatibility with Scala 3.10.1 and the new lambda syntax, followed by reformatting the codebase.

These changes ensure the codebase is easier to maintain and aligned with modern Scala practices while maintaining backward compatibility with the updated compiler.


Statistics

  • 30 files changed
  • 110 additions
  • 157 deletions

@halotukozak halotukozak self-assigned this Nov 20, 2025
@halotukozak halotukozak added this to the Stretch Goals milestone Nov 26, 2025
# Conflicts:
#	src/alpaca/DebugSettings.scala
#	src/alpaca/internal/internal.scala
#	src/alpaca/internal/lexer/Lexem.scala
#	src/alpaca/internal/lexer/Lexer.scala
#	src/alpaca/internal/lexer/Token.scala
#	src/alpaca/internal/lexer/Tokenization.scala
#	src/alpaca/internal/parser/Parser.scala
#	src/alpaca/internal/parser/createTables.scala
#	test/src/alpaca/ParserApiTest.scala
#	test/src/alpaca/internal/DefaultTest.scala
#	test/src/alpaca/internal/lexer/LexerTest.scala
#	test/src/alpaca/internal/parser/ParseTableTest.scala
@halotukozak halotukozak added the experimental MR with experimental Scala feature application label Dec 21, 2025
# Conflicts:
#	src/alpaca/internal/lexer/Lexeme.scala
#	src/alpaca/internal/lexer/Lexer.scala
#	src/alpaca/internal/lexer/PositionTracking.scala
#	src/alpaca/internal/lexer/Tokenization.scala
#	src/alpaca/lexer.scala
#	test/src/alpaca/ParserApiTest.scala
#	test/src/alpaca/integration/MainTest.scala
#	thesis/src/out/alpaca.pdf
@halotukozak halotukozak changed the title Update Scala version to 3.10.1 and refactor code to use relaxed lambda syntax Use relaxed lambda syntax Dec 28, 2025
@github-actions github-actions bot added enhancement New feature or request Parser refactoring labels Dec 30, 2025
@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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant