Skip to content

Add end locations for Case, Asm, and Select#15452

Merged
straight-shoota merged 8 commits intocrystal-lang:masterfrom
FnControlOption:end_location
May 8, 2025
Merged

Add end locations for Case, Asm, and Select#15452
straight-shoota merged 8 commits intocrystal-lang:masterfrom
FnControlOption:end_location

Conversation

@FnControlOption
Copy link
Contributor

@FnControlOption FnControlOption commented Feb 11, 2025

Added end locations to Case, Asm, and Select

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

LGTM
But it would be nice if we could split out the line continuation fix (4776fa1) into a separate PR.
It's not directly related to the other changes.

@Sija
Copy link
Contributor

Sija commented Feb 12, 2025

@FnControlOption Would be nice to fix as well the issue mentioned in crystal-ameba/ameba#548 (comment)

@Sija
Copy link
Contributor

Sija commented Feb 12, 2025

Btw, CI is failing in (only) one instance with: BUG: trying to downcast (Crystal::Location | Nil) <- Crystal::Location (Exception)

@straight-shoota
Copy link
Member

straight-shoota commented May 1, 2025

The changes in 1fdc246 and 673353c fail to build on Crystal 1.0.0 due to a compiler error.
The error message is: BUG: trying to downcast (Crystal::Location | Nil) <- Crystal::Location (Exception). This is fixed in Crystal 1.1.0 (probably #10538 and/or #10759).

I added a commit with a workaround for Crystal 1.0

@straight-shoota straight-shoota added this to the 1.17.0 milestone May 6, 2025
@straight-shoota straight-shoota merged commit 4fa328c into crystal-lang:master May 8, 2025
34 checks passed
@straight-shoota straight-shoota changed the title Fix end locations of some Crystal AST nodes Add end locations for Case, Asm, and Select May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants