-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(goast): enhance local variable and printf handling in GoFull…
…IdentListener The commit updates the GoFullIdentListener to improve the handling of local variables and function calls, particularly for the `fmt.Printf` family. It includes: - Adding a list of `fmt` functions to a dedicated variable. - Modifying the `handleForPrimary` function to include a new parameter for local variable detection and enhance the logic for `fmt` function calls. - Introducing a new private function `getValueFromPrintf` to extract the content from `fmt.Printf` calls. - Adjusting the `nodeNameFromExpr` function to account for the new local variable flag. This change is accompanied by additional test cases to ensure the correct identification of local variables and function calls.
- Loading branch information
Showing
2 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters