Skip to content

Conversation

@jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Jun 26, 2025

Fixes an issue where throws and a return intent would break parsing of chapel signatures. This was because the parser was capturing throws and treating it like a return intent, so it didn't know what to do with the actual return intent.

To implement this, I actually had to fix several things

  • return intents and return types where parsed together, complicating the addition of throws. I split them apart
  • just using regex, the pattern const throws would get treated as a single intent, which is not correct. This required me to add a special function to fixup the regex match.

Fixes the issue described in chapel-lang/chapel#23776, once this fix propagates to Chapel main.

[Reviewed by @lydia-duncan]

Signed-off-by: Jade Abraham <[email protected]>
Copy link
Member

@lydia-duncan lydia-duncan left a comment

Choose a reason for hiding this comment

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

Just two comment adjustments, otherwise this is really good, thank you!

Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 merged commit 5cc80b0 into chapel-lang:main Jun 27, 2025
1 check passed
@jabraham17 jabraham17 deleted the fix-rendering-of-throws branch June 27, 2025 17:42
jabraham17 added a commit to chapel-lang/chapel that referenced this pull request Jul 1, 2025
Resolves a TODO in the `Map` docs which was blocked by a
chpldoc/chapeldomain bug. That
[bug](#23776) is fixed with
chapel-lang/sphinxcontrib-chapeldomain#103 and
#27468, so the TODO can be
resolved

[Reviewed by @ShreyasKhandekar]
jabraham17 added a commit that referenced this pull request Jul 1, 2025
Fixes the rendering of variables, which after
#103 would
always have extra colons being inserted, due to how variables are
parsed. This PR makes similar transformations as #103 did to separate
types and default values to solve this problem
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