Skip to content

add optional marker for early exits in algorithm steps#683

Open
michaelficarra wants to merge 7 commits intomainfrom
mark-early-exits
Open

add optional marker for early exits in algorithm steps#683
michaelficarra wants to merge 7 commits intomainfrom
mark-early-exits

Conversation

@michaelficarra
Copy link
Copy Markdown
Member

@michaelficarra michaelficarra commented Mar 28, 2026

Fixes #673. I went with a global toggle like we use with user code annotations, rather than per-algorithm.

image image image

Disclaimer: I used AI in the process of making this PR.

@michaelficarra michaelficarra requested review from a team and bakkot March 28, 2026 16:37
@nicolo-ribaudo
Copy link
Copy Markdown
Member

This should also mark IfAbruptCloseIterator, IfAbruptCloseAsyncIterator, and IfAbruptRejectPromise.

@michaelficarra
Copy link
Copy Markdown
Member Author

I added support for the 262 macros (though I don't love hard-coding that into ecmarkup) and I updated the styling to match user code annotations:

image

Here's what it looks like with both of them on:

image

}

// get text content of an element excluding nested <ol> children
function ownTextContent(el: Element): string {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Depending on whether #684 lands before this, this function may need to be pulled from the helper in utils.

Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo 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 👍

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.

highlight all AO exit points when you click return/throw

3 participants