summaryrefslogtreecommitdiff
path: root/src/ste/TagNode.php
blob: ce713c0f4fef3ea5fe9fbc6eb7cdbea35af835f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

namespace kch42\ste;

class TagNode extends ASTNode
{
    /** @var string */
    public $name;

    /** @var ASTNode[][] */
    public $params = [];

    /** @var ASTNode[] */
    public $sub = [];

    /**
     * @param string $tpl
     * @param int $off
     * @param string $name
     * @param ASTNode[][] $params
     * @param ASTNode[] $sub
     */
    public function __construct(string $tpl, int $off, string $name = "", array $params = [], array $sub = [])
    {
        parent::__construct($tpl, $off);
        $this->name = $name;
        $this->params = $params;
        $this->sub = $sub;
    }
}