Skip to content
Snippets Groups Projects
Commit b014f148 authored by Nora Abi Akar's avatar Nora Abi Akar Committed by Sam Yates
Browse files

add support for != conditionals (#894)

* Accept `tok::ne` for conditional expressions in modcc, and emit correctly as '!=' in `cexpr_emit`.
parent 82a0ee35
No related branches found
No related tags found
No related merge requests found
......@@ -1133,6 +1133,7 @@ expression_ptr binary_expression(Location loc,
return make_expression<PowBinaryExpression>(
loc, std::move(lhs), std::move(rhs)
);
case tok::ne :
case tok::lt :
case tok::lte :
case tok::gt :
......
......@@ -96,6 +96,7 @@ void CExprEmitter::visit(BinaryExpression* e) {
{tok::gt, ">"},
{tok::gte, ">="},
{tok::equality, "=="},
{tok::ne, "!="},
{tok::min, "min"},
{tok::max, "max"},
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment