Skip to content

feature: 🍺 Support for Continue statement #175

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

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Conversation

shivasurya
Copy link
Owner

Description:

This pull request introduces support for parsing and handling continue statements in the code graph. The changes include updates to the core parsing logic, graph construction, and associated test cases.

Parsing and Graph Construction Enhancements:

  • Added ContinueStmt field to the Node struct in sourcecode-parser/graph/construct.go to handle continue statements.
  • Implemented logic to parse continue statements in sourcecode-parser/graph/construct.go and add them to the code graph.
  • Created a new function ParseContinueStatement in sourcecode-parser/graph/java/parse_statement.go to parse continue statements from the AST.

Test Case Additions:

  • Updated TestBuildGraphFromAST in sourcecode-parser/graph/construct_test.go to include continue statements in test cases. [1] [2]
  • Added TestParseContinueStatement in sourcecode-parser/graph/java/parse_statement_test.go to validate the parsing of continue statements.
  • Added TestContinueStmt in sourcecode-parser/model/stmt_test.go to test various methods of the ContinueStmt struct.

Model and Query Updates:

  • Introduced ContinueStmt struct and interface in sourcecode-parser/model/stmt.go to represent continue statements.
  • Added methods to handle continue statements in sourcecode-parser/graph/query.go, including GetContinueStmt and updates to generateProxyEnv. [1] [2] [3] [4]

Checklist:

  • Tests passing (gradle testGo)?
  • Lint passing (golangci-lint run this requires golangci-lint)?

@shivasurya shivasurya added the enhancement New feature or request label Nov 4, 2024
@shivasurya shivasurya self-assigned this Nov 4, 2024
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 91.11111% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.65%. Comparing base (d8bbf0c) to head (352e389).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sourcecode-parser/graph/query.go 55.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   73.17%   73.65%   +0.48%     
==========================================
  Files          16       16              
  Lines        2229     2274      +45     
==========================================
+ Hits         1631     1675      +44     
- Misses        557      559       +2     
+ Partials       41       40       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shivasurya shivasurya merged commit 67efb23 into main Nov 4, 2024
4 checks passed
@shivasurya shivasurya deleted the shiva/continue-stmt branch November 4, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant