LibJS/AST: Implement prefixed update expressions

This commit is contained in:
0xtechnobabble 2020-03-14 20:44:57 +02:00 committed by Andreas Kling
commit db64f364f0
Notes: sideshowbarker 2024-07-19 08:18:32 +09:00
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 {