Skip to content

Conversation

jakebailey
Copy link
Member

Fixes #1836

This is just a pure port. Seemingly no tests hit this.

Copy link
Contributor

@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.

Pull Request Overview

This PR standardizes the handling of function lookups by moving the getContainingFunction utility from the checker package to the AST package as GetContainingFunction and updating all references to use the centralized version.

  • Moves getContainingFunction from checker utilities to AST utilities as a public function
  • Updates all call sites across the codebase to use the new AST package function
  • Removes the duplicate implementation from the checker package

Reviewed Changes

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

Show a summary per file
File Description
internal/ast/utilities.go Adds the new GetContainingFunction function to the AST package
internal/checker/utilities.go Removes the old getContainingFunction function
internal/checker/grammarchecks.go Updates call site to use ast.GetContainingFunction
internal/checker/checker.go Updates multiple call sites to use ast.GetContainingFunction
internal/ls/documenthighlights.go Updates call site and refactors variable names for consistency

@jakebailey jakebailey enabled auto-merge October 7, 2025 20:44
@jakebailey jakebailey added this pull request to the merge queue Oct 7, 2025
Merged via the queue into main with commit 19ec922 Oct 7, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/doc-highlight-fix branch October 7, 2025 22:30
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.

arrow function keywords async and await crash when hover over
2 participants