Skip to content

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Feb 2, 2026

This predicate already exists for cpp and rust. It was requested here.

@owen-mc owen-mc requested a review from a team as a code owner February 2, 2026 16:09
Copilot AI review requested due to automatic review settings February 2, 2026 16:09
@github-actions github-actions bot added the Go label Feb 2, 2026
@owen-mc owen-mc added the no-change-note-required This PR does not need a change note label Feb 2, 2026
Copy link
Contributor

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.

Pull request overview

This PR adds the getEnclosingBlock() predicate to the AstNode class in Go's QL library, aligning with similar functionality already available in C++ and Rust. The predicate returns the innermost block statement that encloses a given AST node.

Changes:

  • Added AstNode.getEnclosingBlock() predicate to retrieve the innermost enclosing BlockStmt for any AST node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Go no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant