mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-15 02:03:53 +00:00
da1c71ec4c
Names were kept for now. Change-Id: Ib2eb5d7b523a64f2a0f72fdcdde2043a76cc9a37
30 lines
615 B
PHP
30 lines
615 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\AbuseFilter\Parser;
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
}
|