public static function isTokenType($type) {
    $types = func_get_args();
    return function ($node) use ($types) {
      return $node instanceof TokenNode && in_array($node->getType(), $types);
    };
  }