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

Feat: Add an explicit condition marker for if and while #1570

Conversation

EagleoutIce
Copy link
Member

No description provided.

@EagleoutIce EagleoutIce requested a review from Copilot April 12, 2025 18:19
@EagleoutIce EagleoutIce linked an issue Apr 12, 2025 that may be closed by this pull request
@EagleoutIce EagleoutIce changed the base branch from main to cfg-staging April 12, 2025 18:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/util/mermaid/cfg.ts:20

  • Ensure that the explicit subgraph condition for ExpressionList correctly captures all intended cases; verify that using 'id + "-exit"' to determine exit vertices aligns with the desired control flow semantics for constructs like if and while.
if(vertex.name === RType.ExpressionList && vertex.type === CfgVertexType.Expression && cfg.graph.hasVertex(id + '-exit')) {

src/util/mermaid/cfg.ts:8

  • The updated getLexeme function now returns undefined instead of '' when no lexeme is available, which could affect downstream processing expecting a string. Verify that this change is intentional and that the consuming code handles undefined values appropriately.
return n ? n.info.fullLexeme ?? n.lexeme ?? '' : undefined;

@EagleoutIce EagleoutIce merged commit e40a7b5 into cfg-staging Apr 12, 2025
7 checks passed
@EagleoutIce EagleoutIce deleted the 1563-cfg-add-an-explicit-middle-marker-for-the-if-condition branch April 12, 2025 18:33
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.

[CFG] add an explicit middle marker for the if condition
1 participant