public static function isTokenType($type) {
    $types = func_get_args();
    return function ($node) use ($types) {
      return $node instanceof TokenNode && in_array($node->getType(), $types);
    };
  }
public static function isTokenType($type) {
    $types = func_get_args();
    return function ($node) use ($types) {
      return $node instanceof TokenNode && in_array($node->getType(), $types);
    };
  }
public static function isTokenType ( $ type ) { $ types = func_get_args ( ) ; return function ( $ node ) use ( $ types ) { return $ node instanceof TokenNode && in_array ( $ node -> getType ( ) , $ types ) ; } ; }
Callback to test if match to given token type.

@param int|string $type
Token type.

@return callable
Callback to test if match to given token type .