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

TreeSyntax: separate block in scala3 stats #3276

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Conversation

kitbellew
Copy link
Contributor

Follow-on to #3139 and #3269.

@@ -302,7 +302,7 @@ object TreeSyntax {
case _: Decl.Val | _: Decl.Var | _: Decl.Def | _: Defn.Type | _: Term.Ref | _: Member.Apply |
_: Term.Ascribe | _: Term.Tuple | _: Term.New | _: Term.Interpolate | _: Term.Xml |
_: Lit =>
true
!dialect.allowSignificantIndentation
Copy link
Contributor Author

@kitbellew kitbellew Jul 24, 2023

Choose a reason for hiding this comment

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

currently, the only case that applies for scala3 is 3 lines down (Stat.WithTemplate).

another option is to leave this line (305) as true and separate blocks for scala2 and scala3 exactly the same. that will change a few tests, though. a few more blank lines vs perhaps making it a bit more readable?

@kitbellew kitbellew requested a review from tgodzik July 24, 2023 22:57
Copy link
Collaborator

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Looks fine for me, we can add the line separators , that's not an issue. Thanks for looking into this!

@kitbellew kitbellew merged commit 16819e5 into scalameta:main Jul 26, 2023
24 checks passed
@kitbellew kitbellew deleted the 3276 branch July 26, 2023 14:24
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.

None yet

2 participants