1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibJS/AST: Implement prefixed update expressions

This commit is contained in:
0xtechnobabble 2020-03-14 20:44:57 +02:00 committed by Andreas Kling
parent 20a0fc5576
commit db64f364f0
2 changed files with 17 additions and 4 deletions

View file

@ -451,9 +451,10 @@ enum class UpdateOp {
class UpdateExpression : public Expression {
public:
UpdateExpression(UpdateOp op, NonnullOwnPtr<Expression> argument)
UpdateExpression(UpdateOp op, NonnullOwnPtr<Expression> argument, bool prefixed = false)
: m_op(op)
, m_argument(move(argument))
, m_prefixed(prefixed)
{
}
@ -465,6 +466,7 @@ private:
UpdateOp m_op;
NonnullOwnPtr<Identifier> m_argument;
bool m_prefixed;
};
enum class DeclarationType {