mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibCpp: Parse Bitwise & Logical Or & And operators
This commit is contained in:
parent
8962581c9c
commit
575d6a8ee1
Notes:
sideshowbarker
2024-07-18 20:41:41 +09:00
Author: https://github.com/itamar8910
Commit: 575d6a8ee1
Pull-request: https://github.com/SerenityOS/serenity/pull/6009
3 changed files with 27 additions and 2 deletions
|
@ -209,6 +209,12 @@ void BinaryExpression::dump(size_t indent) const
|
|||
case BinaryOp::NotEqual:
|
||||
op_string = "!=";
|
||||
break;
|
||||
case BinaryOp::LogicalOr:
|
||||
op_string = "||";
|
||||
break;
|
||||
case BinaryOp::LogicalAnd:
|
||||
op_string = "&&";
|
||||
break;
|
||||
}
|
||||
|
||||
m_lhs->dump(indent + 1);
|
||||
|
@ -319,6 +325,9 @@ void UnaryExpression::dump(size_t indent) const
|
|||
case UnaryOp::PlusPlus:
|
||||
op_string = "++";
|
||||
break;
|
||||
case UnaryOp::Address:
|
||||
op_string = "&";
|
||||
break;
|
||||
default:
|
||||
op_string = "<invalid>";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue