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

Implement flip flop operator #2317

Merged
merged 2 commits into from
Nov 10, 2024
Merged

Implement flip flop operator #2317

merged 2 commits into from
Nov 10, 2024

Conversation

richardboehme
Copy link
Contributor

TIL this existed :^)

We now also pass the whole language/if_spec!

This whole thing uses some interesting hacks, where I'm not sure if they are nice:

  • I reuse the ElseInstruction to fetch the instructions of the two conditions (taken from IfInstruction)
  • I hoist the flip flop states to the top of the generated C++ file, not sure if this is nice but we need to store the state somewhere...

TIL this existed :^)

We now also pass the whole language/if_spec!
@herwinw
Copy link
Member

herwinw commented Nov 10, 2024

This was one of the operators that I wanted to add to #2310 as "we are never going to support this, so maybe we should still be able to run those specs" 😅

@herwinw
Copy link
Member

herwinw commented Nov 10, 2024

I added a commit to enable the specs in precedence_spec.rb as well, since these now work too.

@richardboehme richardboehme merged commit 67e7934 into master Nov 10, 2024
15 checks passed
@richardboehme richardboehme deleted the rb/flip-flop branch November 10, 2024 11:54
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