Skip to content

Refinement #266

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

Merged
merged 2 commits into from
May 29, 2023
Merged

Refinement #266

merged 2 commits into from
May 29, 2023

Conversation

eed3si9n
Copy link
Collaborator

Fixes #265

Problem

Compound type with refinement (structural type with a parent) doesn't parse.

Solution

This adds support for it.
It collides with context bounds A: B: C, so the precedence is set to -1.

@eed3si9n eed3si9n mentioned this pull request May 29, 2023
Problem
-------
Compound type with refinement (structural type with a parent)
doesn't parse.

Solution
--------
This adds support for it.
It collides with context bounds `A: B: C`, so the precedence is set to
-1.
@@ -3,9 +3,9 @@
# This is an integration test to generally check the quality of parsing.

SCALA_SCALA_LIBRARY_EXPECTED=95
SCALA_SCALA_COMPILER_EXPECTED=84
SCALA_SCALA_COMPILER_EXPECTED=87
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Scala 2 compiler bumps to 87% with this change.

Copy link
Collaborator

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

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

Looks good to me! LGTM!

DOTTY_COMPILER_EXPECTED=81
SYNTAX_COMPLEXITY_CEILING=2300
SYNTAX_COMPLEXITY_CEILING=2800
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have an idea of how much is too much here? Like when should it cause refactoring to account for the bump?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess when we observe compilation time or memory usage to degrade?

@eed3si9n eed3si9n merged commit 4e59461 into tree-sitter:master May 29, 2023
@eed3si9n eed3si9n deleted the wip/refinement branch May 29, 2023 21:31
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.

Refined types
2 participants