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

Adds support for IS_OP opcode #201

Merged
merged 2 commits into from
Oct 10, 2021
Merged

Adds support for IS_OP opcode #201

merged 2 commits into from
Oct 10, 2021

Conversation

dotjrich
Copy link
Contributor

@dotjrich dotjrich commented Oct 8, 2021

ASTree.cpp Outdated
stack.pop();
// The operand will be 0 for 'is' and 1 for 'is not'.
// Map those back to the appropriate values in ASTCompare::op_str()
stack.push(new ASTCompare(left, right, operand ? 9 : 8));
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
stack.push(new ASTCompare(left, right, operand ? 9 : 8));
stack.push(new ASTCompare(left, right, operand ? ASTCompare::CMP_IS_NOT : ASTCompare::CMP_IS));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, nice! I didn't know that existed. It's much cleaner now.

@zrax zrax merged commit 81f3e5f into zrax:master Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants