Stmt创建

This commit is contained in:
Jerry Yan 2021-03-17 12:09:59 +08:00
parent 42df1352d2
commit 8b97e99bb7

View File

@ -0,0 +1,40 @@
<?php
/**
* @filename StatementInterface.php
* @author Jerry Yan <792602257@qq.com>
* @date 2021/2/22 13:56
*/
namespace JerryYan\DSL\AST\Statement;
abstract class StatementInterface
{
/** @var ?StatementInterface */
protected $parent;
/** @var ?StatementInterface */
protected $child;
/**
* @param StatementInterface|null $parent
* @author Jerry Yan <792602257@qq.com>
* @date 2021/3/16 9:49
*/
public function setParent(?StatementInterface $parent): void
{
$this->parent = $parent;
}
/**
* @param StatementInterface|null $child
* @author Jerry Yan <792602257@qq.com>
* @date 2021/3/16 9:50
*/
public function setChild(?StatementInterface $child): void
{
$this->child = $child;
}
abstract public function validate(): bool;
}