diff options
Diffstat (limited to 'lib/exTpl/BinaryExpression.php')
| -rw-r--r-- | lib/exTpl/BinaryExpression.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/exTpl/BinaryExpression.php b/lib/exTpl/BinaryExpression.php new file mode 100644 index 0000000..1c82730 --- /dev/null +++ b/lib/exTpl/BinaryExpression.php @@ -0,0 +1,27 @@ +<?php + +namespace exTpl; + +/** + * BinaryExpression represents a binary operator. + */ +abstract class BinaryExpression implements Expression +{ + protected Expression $left; + protected Expression $right; + protected mixed $operator; + + /** + * Initializes a new Expression instance. + * + * @param Expression $left left operand + * @param Expression $right right operand + * @param mixed $operator operator token + */ + public function __construct(Expression $left, Expression $right, mixed $operator) + { + $this->left = $left; + $this->right = $right; + $this->operator = $operator; + } +} |
