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

catch exception capture #21

Merged
merged 1 commit into from
Jan 17, 2025
Merged

catch exception capture #21

merged 1 commit into from
Jan 17, 2025

Conversation

fonsp
Copy link
Member

@fonsp fonsp commented Jan 8, 2025

New node ExceptionCapture. Fix #16

@fonsp fonsp requested a review from savq January 8, 2025 23:40
@@ -111,7 +111,7 @@ simple-statement {

Condition { expr _t? }
ElseIfClause { kw<'elseif'> Condition block? }
CatchClause { kw<'catch'> block? } // TODO: ExceptionCapture
CatchClause { kw<'catch'> ExceptionCapture { !simple Identifier }? block? }
Copy link
Member Author

Choose a reason for hiding this comment

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

Did I use simple correctly here?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, if that solves the parsing conflict it's probably fine.

IIRC !simple is used to ensure return a, b is parsed (return (tuple a b)) and not (tuple (return a) b).

@fonsp fonsp merged commit 500bb47 into main Jan 17, 2025
1 check passed
@fonsp fonsp deleted the catch-capture branch January 17, 2025 08:47
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.

Trailing space after catch causes parser error if the next line is one character
2 participants