aboutsummaryrefslogtreecommitdiff
path: root/lib/exTpl/MinusExpression.php
blob: 6b81e91dd1e3c1c82424deb6cc79cb5ca6600828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

namespace exTpl;

/**
 * MinusExpression represents the unary minus operator ('-').
 */
class MinusExpression extends UnaryExpression
{
    /**
     * Returns the value of this expression.
     *
     * @param Context $context  symbol table
     */
    public function value(Context $context): mixed
    {
        return -$this->expr->value($context);
    }
}