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

Cristopher aguilar10/main #33

Closed
wants to merge 29 commits into from
Closed

Cristopher aguilar10/main #33

wants to merge 29 commits into from

Conversation

0xLucqs
Copy link
Contributor

@0xLucqs 0xLucqs commented Aug 19, 2024

No description provided.

CristopherAguilar10 and others added 28 commits August 19, 2024 15:59
- 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.
- 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.
@0xLucqs 0xLucqs force-pushed the CristopherAguilar10/main branch 2 times, most recently from 1ec0f88 to c7e346d Compare August 19, 2024 14:10
@0xLucqs 0xLucqs force-pushed the CristopherAguilar10/main branch from c7e346d to 0abf20e Compare August 19, 2024 14:38
@0xLucqs 0xLucqs closed this Oct 2, 2024
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.

3 participants