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

Robmarti12/convert compile to static (#17) #18

Merged
merged 2 commits into from
Aug 19, 2023

Conversation

ThomasHambach
Copy link
Owner

  • Refactor error handling in Expression class

Removed the ErrorListener instances in the Expression class and simplified the error handling process. These changes reduced redundancy and improved the readability of the code. Now, instead of using two separate ErrorListener instances to catch lexer and parser errors, we just throw an error in case parsing fails. Errors are now stored directly in an array in the Expression instance, simplifying access to them.

  • Refactor tests for better error handling and clean up

Refactored Expression.test.ts and JsonSerialize.test.ts to utilize HasErrors() function for clearer, more accurate error handling. Additionally, cleaned up unnecessary variable declarations in JsonSerialize.test.ts for better readability. These changes improve test robustness and clarity in code.


Co-authored-by: robmarti12 robin.martin@cmcitymedia.de

ThomasHambach and others added 2 commits August 18, 2023 12:14
* Refactor error handling in Expression class

Removed the ErrorListener instances in the Expression class and simplified the error handling process. These changes reduced redundancy and improved the readability of the code. Now, instead of using two separate ErrorListener instances to catch lexer and parser errors, we just throw an error in case parsing fails. Errors are now stored directly in an array in the Expression instance, simplifying access to them.

* Refactor tests for better error handling and clean up

Refactored Expression.test.ts and JsonSerialize.test.ts to utilize HasErrors() function for clearer, more accurate error handling. Additionally, cleaned up unnecessary variable declarations in JsonSerialize.test.ts for better readability. These changes improve test robustness and clarity in code.

---------
Co-authored-by: robmarti12 <robin.martin@cmcitymedia.de>
@ThomasHambach ThomasHambach merged commit 163a429 into main Aug 19, 2023
1 check passed
@sonarcloud
Copy link

sonarcloud bot commented Aug 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

95.2% 95.2% Coverage
0.0% 0.0% Duplication

@ThomasHambach ThomasHambach deleted the convert-compile-to-static branch August 19, 2023 03:53
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.

1 participant