public function get_type( $type ) {
		$tokens = [];

		foreach ( $this->text as $index => $token ) {
			if ( $token->type === $type ) {
				$tokens[ $index ] = $token;
			}
		}

		return $tokens;
	}
public function get_type( $type ) {
		$tokens = [];

		foreach ( $this->text as $index => $token ) {
			if ( $token->type === $type ) {
				$tokens[ $index ] = $token;
			}
		}

		return $tokens;
	}
public function get_type ( $ type ) { $ tokens = [ ] ; foreach ( $ this -> text as $ index => $ token ) { if ( $ token -> type === $ type ) { $ tokens [ $ index ] = $ token ; } } return $ tokens ; }
Retrieves all tokens of the given type.

@param int $type The type to get.

@return Token[] An array of numerically indexed tokens.
Retrieves all tokens of the given type .