Kahlan\Jit\TokenStream::is PHP Method

is() public method

Checks if there is a token of the given type at the given position.
public is ( integer | string $type, integer $index = null ) : boolean
$type integer | string Token type.
$index integer Token position, if none given, consider the current iteration position.
return boolean
    public function is($type, $index = null)
    {
        return $this->getType($index) === $type;
    }