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

namespace exTpl;

/**
 * NotExpression represents the logical negation operator ('!').
 */
class NotExpression extends UnaryExpression
{
    /**
     * Returns the value of this expression.
     *
     * @param Context $context symbol table
     */
    public function value(Context $context): bool
    {
        return !$this->expr->value($context);
    }
}