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:
parent
20a0fc5576
commit
db64f364f0
2 changed files with 17 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue