Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infix operators #347

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Infix operators #347

merged 1 commit into from
Jan 6, 2025

Conversation

simerplaha
Copy link
Member

  • Uses EnumerationMacros.sealedInstancesOf[InfixOperator] to fetch infix operators instead of calling parser on each manually.
  • Added ParserUtil.

@simerplaha simerplaha requested a review from tdroxler January 6, 2025 05:42
val reserved: Array[Reserved] =
EnumerationMacros
.sealedInstancesOf[Reserved]
.toArray
.sorted

val infix: Array[InfixOperator] =
EnumerationMacros
.sealedInstancesOf[InfixOperator]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG didn't know we had this macro, I have few places where I could use this in the explorer-backend

Copy link
Member

@tdroxler tdroxler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweat, this clean nicely the code

@simerplaha simerplaha merged commit 26131d4 into master Jan 6, 2025
3 checks passed
@simerplaha simerplaha deleted the infix_operator branch January 6, 2025 07:13
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