mediawiki-extensions-AbuseF.../includes/parser/AFPSyntaxTree.php

28 lines
564 B
PHP
Raw Normal View History

<?php
/**
* A class representing a whole AST generated by AFPTreeParser, holding AFPTreeNode's. This wrapper
* could be expanded in the future. For now, it's mostly useful for typehints, and to have an
* evalTree function in the CachingParser.
*/
class AFPSyntaxTree {
/**
* @var AFPTreeNode|null
*/
private $rootNode;
/**
* @param AFPTreeNode|null $root
*/
public function __construct( AFPTreeNode $root = null ) {
$this->rootNode = $root;
}
/**
* @return AFPTreeNode|null
*/
public function getRoot() {
return $this->rootNode;
}
}