feature: 🍺 Support for YieldStmt statement
#176
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This pull request introduces support for parsing and handling
yieldstatements in Java source code within thesourcecode-parserpackage. The changes include modifications to the core parsing logic, the addition of new test cases, and updates to the model and query handling to accommodateyieldstatements.Parsing and Model Updates:
YieldStmtto theNodestruct insourcecode-parser/graph/construct.goand implemented parsing logic foryieldstatements. [1] [2]ParseYieldStatementfunction insourcecode-parser/graph/java/parse_statement.goto handle the parsing ofyieldstatements.YieldStmtstruct and its methods insourcecode-parser/model/stmt.goto representyieldstatements in the model.Testing Enhancements:
TestBuildGraphFromASTinsourcecode-parser/graph/construct_test.goto include test cases foryieldstatements and adjusted expected node and edge counts. [1] [2]TestParseYieldStatementinsourcecode-parser/graph/java/parse_statement_test.goto verify the correct parsing of variousyieldstatement scenarios.TestYieldStmtinsourcecode-parser/model/stmt_test.goto test theToStringmethod of theYieldStmtstruct.Query Handling:
GetYieldStmtmethod insourcecode-parser/graph/query.goand updatedgenerateProxyEnvto handleyieldstatements in queries. [1] [2] [3] [4]Example Usage:
yieldintest-src/android/app/src/main/java/com/ivb/udacity/movieDetailActivity.javato demonstrate the new functionality.Checklist:
gradle testGo)?golangci-lint runthis requires golangci-lint)?