-
Notifications
You must be signed in to change notification settings - Fork 34
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
Cristopher aguilar10/main #33
Closed
Closed
Conversation
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
- Corrected import paths for `cairo_lang_syntax` and `cairo_lang_diagnostics`. - Defined custom `Lint`, `LintContext`, and `LintPass` structs and traits to replace missing imports from `cairo_lang_compiler`. - Implemented `EraseOp` struct with the `LintPass` trait. - Added logic to detect and lint expressions that always result in zero, such as `x * 0`, `0 / x`, and `x & 0`. This commit sets up the basic linting functionality in `erasing_op.rs` and resolves previous import errors, ensuring the proper detection of redundant expressions that can be simplified to zero.
…r functionality.
- Migrated 'EraseOp' to use the Cairo plugin system, implementing 'AnalyzerPlugin'. - Removed deprecated 'Lint', 'LintContext', and 'LintPass' imports. - Added 'check_expr' function to check and report redundant operations that result in zero. - Implemented correct destructuring of 'BinaryOperator' and use of 'SyntaxGroup'. - EraseOp' now derives 'Debug' to meet 'AnalyzerPlugin' requirements.
- Added 'AnalyzerPlugin' implementation for 'EraseOp', allowing detection of redundant operations that always result in zero. - Registered 'EraseOp' in the CairoLint plugin set. - Updated 'CairoLint' to include binary expression parsing logic and delete operations. - Minor fixes to imports and code structure to improve compatibility with the plugin system.
…corresponding code
0xLucqs
force-pushed
the
CristopherAguilar10/main
branch
2 times, most recently
from
August 19, 2024 14:10
1ec0f88
to
c7e346d
Compare
0xLucqs
force-pushed
the
CristopherAguilar10/main
branch
from
August 19, 2024 14:38
c7e346d
to
0abf20e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.