Skip to content
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

Sync #248

Merged
merged 20 commits into from
Mar 6, 2024
Merged

Sync #248

merged 20 commits into from
Mar 6, 2024

Conversation

hahwul
Copy link
Member

@hahwul hahwul commented Mar 6, 2024

No description provided.

hahwul and others added 20 commits January 23, 2024 22:45
- Added `src/miniparsers/java.cr` file
- Added `JavaParser` class with `parse`, `parse_import_statements`, `parse_classes_body`, and `print_tokens` methods
- Implemented tokenization logic in `MiniLexer` class
- Added `line` property to `Token` class and updated `to_s` method to handle newline characters correctly
- Added `src/minilexers/java.cr` file with keyword, literal, separator, and operator definitions for Java
- Implemented `JavaLexer` class for tokenizing Java code, handling different types of tokens, and skipping whitespace and comments
- Refactor `@classes_body_tokens` variable to `@classes_tokens` in `java.cr`
- Add `@class_annotation` variable for storing class annotations in `java.cr`
- Modify `parse_classes` method in `java.cr` to also parse class annotations
- Add `parse_formal_parameters` method for parsing formal parameters in `java.cr`
- Add `parse_annotations` method for parsing annotations in `java.cr`
- Modify `parse_methods` method in `java.cr` to correctly parse method declarations and bodies
- Add imports for `java` lexer and parser in `analyzer_spring.cr`
- Change variable name `has_class_been_imported` to `has_spring_web_bind_class_been_import` in `analyzer_spring.cr`
- Refactor code in `analyzer_spring.cr` to use the `JavaLexer` and `JavaParser` classes
- Modify `tokenize` method in `minilexer.cr` to pass line number obtained from `line()` method to `Token` constructor
- Modify `<<` method in `minilexer.cr` to use the new `line()` method to calculate line number for each token
- Modify `JavaParser` class for improved handling of `{}` characters in `parse_formal_parameters` method
- Update `parse_classes` method to correctly parse class bodies
- Implement `parse_methods` method to handle parsing of methods within the class body
- Refactor `analyzers/analyzer_spring.cr` by removing unnecessary `begin` and `rescue` blocks in `analyze` method
- Rename `has_spring_web_bind_class_been_import` to `has_spring_web_bind_package_been_import`
- Add parsing of base URL, methods, annotations, and parameters in the Spring MVC class
- Improve handling of methods without `@RequestMapping` annotation
- Remove unused code and variables related to the `Reactive Router`
- Add `get_mapping_path` method for handling parsing of path parameters in method annotations
- Modify logic for retrieving endpoint parameters in the Spring MVC class
- Made modifications to the `java.cr` file to improve logic in tokenization and matching of literals, identifiers, and operators
- Added new methods and updated existing methods in the `java.cr` file to support class parsing and model creation
- Updated the `AnalyzerSpring` class to handle parsing of Spring MVC and Reactive Router code, including endpoints, annotations, and parameters
- Added a `.gitignore` file to the `kotlin_spring` fixtures and included `.gradle` in it
- Added a `.gitignore` file to the `java_spring` fixtures and added `.gradle` to the ignore list
- Refactored and implemented various methods and classes in `src/miniparsers/java.cr`
- Added a new file `detect_kotlin_spring_spe_spec.cr` and test case in `spec/unit_test/detector` for detecting Java Spring
- Updated `src/models/minilexer/minilexer.cr` to include a new line and fix a typo in the method signature
- Made modifications and additions to `src/models/noir.cr` including the addition of new methods
- Updated `spec/functional_test/fixtures/java_spring/src/ItemController.java` to include a package statement and class definition
- Created a new file `src/analyzer/analyzers/analyzer_kotlin_spring.cr` with various methods and functions
- Deleted `src/analyzer/analyzers/analyzer_spring.cr`
- Made changes to `spec/functional_test/testers/java_spring_spec.cr` related to endpoint definitions
- Refactored and reordered code in `src/minilexers/java.cr`
- Made changes to `src/models/endpoint.cr` including the addition of comparison methods
- Modified `src/analyzer/analyzer.cr` to use updated analyzer functions and remove duplicate checks
- Renamed `spec/unit_test/analyzer/analyzer_spring_spec.cr` to `analyzer_kotlin_spring_spec.cr` and updated its contents
- Refactored conditions in `src/detector/detectors/java_spring.cr` for better readability
- Modified `src/detector/detectors/kotlin_spring.cr` to add additional detection conditions
- Added a new file `src/analyzer/analyzers/analyzer_java_spring.cr` with various methods and functions.
- Added support for RequestHeader annotation in endpoint parameters
- Added support for HttpServletRequest argument in endpoint parameters
…yzer

👔 Add identification logic of parameters in Spring #232
@github-actions github-actions bot added 🔎 detector Issue for Detector 🔬 analyzer Issue for Analyzer 📦 output-builder Issue for output builder (format) 💊 spec Issue for test codes 🥢 mini-lexer Issue for mini-lexer and mini-parser labels Mar 6, 2024
@hahwul hahwul merged commit 6a01abe into improve/go-gin-group-pattern Mar 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔬 analyzer Issue for Analyzer 🔎 detector Issue for Detector 🥢 mini-lexer Issue for mini-lexer and mini-parser 📦 output-builder Issue for output builder (format) 💊 spec Issue for test codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants