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

Add feature flag for equal operator #79

Closed
wants to merge 1 commit into from

Conversation

rycont
Copy link
Owner

@rycont rycont commented Mar 12, 2025

Add a feature flag to switch the equal operator from = to ==.

  • Feature Flag: Add EQUAL_OPERATOR_DOUBLE_EQUAL to FEATURE_FLAG enum in core/constant/feature-flags.ts.
  • EqualOperator Class: Modify EqualOperator class in core/node/operator.ts to use == instead of = when FEATURE_FLAG.EQUAL_OPERATOR_DOUBLE_EQUAL is enabled.
  • Tokenize Rules: Add == to OPERATORS array in core/prepare/tokenize/rules.ts.
  • Operator Precedences: Add logic to check FEATURE_FLAG.EQUAL_OPERATOR_DOUBLE_EQUAL and use == instead of = in OPERATOR_PRECEDENCES array in core/node/calculation.ts.
  • Tests: Add test cases for == operator in test/operand-types.test.ts.

For more details, open the Copilot Workspace session.

Add a feature flag to switch the equal operator from `=` to `==`.

* **Feature Flag**: Add `EQUAL_OPERATOR_DOUBLE_EQUAL` to `FEATURE_FLAG` enum in `core/constant/feature-flags.ts`.
* **EqualOperator Class**: Modify `EqualOperator` class in `core/node/operator.ts` to use `==` instead of `=` when `FEATURE_FLAG.EQUAL_OPERATOR_DOUBLE_EQUAL` is enabled.
* **Tokenize Rules**: Add `==` to `OPERATORS` array in `core/prepare/tokenize/rules.ts`.
* **Operator Precedences**: Add logic to check `FEATURE_FLAG.EQUAL_OPERATOR_DOUBLE_EQUAL` and use `==` instead of `=` in `OPERATOR_PRECEDENCES` array in `core/node/calculation.ts`.
* **Tests**: Add test cases for `==` operator in `test/operand-types.test.ts`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/rycont/dalbit-yaksok?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

cloudflare-workers-and-pages bot commented Mar 12, 2025

Deploying dalbit-yaksok with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8d3b78f
Status:🚫  Build failed.

View logs

@rycont
Copy link
Owner Author

rycont commented Mar 14, 2025

Copilot Workspace 테스트용으로 생성하였으나, 결과가 기대에 미치지 못하여 삭제

@rycont rycont closed this Mar 14, 2025
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