1<?php 2 3declare(strict_types=1); 4 5namespace Antlr\Antlr4\Runtime\PredictionContexts; 6 7final class EmptyPredictionContext extends SingletonPredictionContext 8{ 9 public function __construct() 10 { 11 parent::__construct(PredictionContext::EMPTY_RETURN_STATE); 12 } 13 14 public function getLength() : int 15 { 16 return 1; 17 } 18 19 public function isEmpty() : bool 20 { 21 return true; 22 } 23 24 public function getParent(int $index) : ?PredictionContext 25 { 26 return null; 27 } 28 29 public function equals(object $other) : bool 30 { 31 return $other instanceof self; 32 } 33 34 public function __toString() : string 35 { 36 return '$'; 37 } 38} 39