| 1 |
<?php |
| 2 |
|
| 3 |
declare( strict_types = 1 ); |
| 4 |
|
| 5 |
namespace MediaWiki\Extension\Math\WikiTexVC\Nodes; |
| 6 |
|
| 7 |
class ChemFun2u extends TexNode { |
| 8 |
|
| 9 |
|
| 10 |
private $fname; |
| 11 |
|
| 12 |
private $left; |
| 13 |
|
| 14 |
private $right; |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
public function getFname(): string { |
| 20 |
return $this->fname; |
| 21 |
} |
| 22 |
|
| 23 |
public function __construct( string $fname, TexNode $left, TexNode $right ) { |
| 24 |
parent::__construct( $fname, $left, $right ); |
| 25 |
$this->fname = $fname; |
| 26 |
$this->left = $left; |
| 27 |
$this->right = $right; |
| 28 |
} |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
public function getLeft(): TexNode { |
| 34 |
return $this->left; |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
public function getRight(): TexNode { |
| 41 |
return $this->right; |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
public function render() { |
| 46 |
return $this->fname . $this->left->inCurlies() . '_' . $this->right->inCurlies(); |
| 47 |
} |
| 48 |
|
| 49 |
|
| 50 |
public function extractIdentifiers( $args = null ) { |
| 51 |
return []; |
| 52 |
} |
| 53 |
|
| 54 |
} |