Skip to content

Add compilation support for greater than or equal, less than or equal, and not equal operators#188

Open
GermanCodeEngineer wants to merge 3 commits intoPenguinMod:developfrom
GermanCodeEngineer:consistent-operators
Open

Add compilation support for greater than or equal, less than or equal, and not equal operators#188
GermanCodeEngineer wants to merge 3 commits intoPenguinMod:developfrom
GermanCodeEngineer:consistent-operators

Conversation

@GermanCodeEngineer
Copy link
Copy Markdown

Reason for Changes and Summary

PenguinMod has six standard comparison operator blocks. Three of these are compiled, three aren't. This pull request implements compilation for the "not equal", "less than or equal" and "greater than or equal" blocks.
I added code to ScriptTreeGenerator and JSGenerator in the same style as their existing code.

Test Coverage

I updated tw-generate-comparison-matrix-inline.js to also test the new operations. I also improved that script, so one can actually read failed test messages. (looks_say doesn't give you time to read).
I also added the generated XML to a project and ran the tests, which all passed. The created project was added under tw-generate-comparison-matrix-inline.pmp

Copy link
Copy Markdown

@Steve0Greatness Steve0Greatness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mostly seems like a copy-paste of the other blocks, which is fine.

My only issue is that there's a lot of duplicated code in src/compiler/jsgen.js:912-921, but given that seems like an issue with the block it directly states it was based on, I don't think it's a deal breaker.

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.

2 participants