.. _stdlib_rst_label: =============================== RST labels and short type names =============================== .. das:module:: rst_label The RST_LABEL module spells the RST label of a function and the short type names that label hashes. It is the leaf both ``rst`` and the ``rst_comment`` reader share: the reader is a parser macro, and every module parsed before it registers loses its ``//!`` comments, so this module requires only builtin modules and its reference pages are written by hand. All functions and symbols are in "rst_label" module, use require to get access to it. .. code-block:: das require daslib/rst_label ++++++++++++ Label makers ++++++++++++ * :ref:`function_label_file (name: auto; value: TypeDecl?; drop_args: int = 0) : auto ` * :ref:`function_label_file (value: Function?; drop_args: int = 0) : string ` * :ref:`safe_function_name (name: string) : string ` function_label_file ^^^^^^^^^^^^^^^^^^^ .. _function-rst_label_function_label_file_auto_TypeDecl_q__int_0x61: .. das:function:: function_label_file(name: auto; value: TypeDecl?; drop_args: int = 0) : auto Creates a unique, file-name-safe label string for a function: its safe name and a hash of its argument types. :Arguments: * **name** : auto * **value** : :ref:`TypeDecl `?\ & * **drop_args** : int .. _function-rst_label_function_label_file_Function_q__int: .. das:function:: function_label_file(value: Function?; drop_args: int = 0) : string ---- .. _function-rst_label_safe_function_name_string: .. das:function:: safe_function_name(name: string) : string Escapes special characters in a function name to produce a safe identifier for RST output. :Arguments: * **name** : string ++++++++++++++++ Short type names ++++++++++++++++ * :ref:`cleanup_type_short (name: string) : string ` * :ref:`describe_type_short (td: TypeDecl?) : string ` .. _function-rst_label_cleanup_type_short_string: .. das:function:: cleanup_type_short(name: string) : string Drops the const, ref, implicit and temporary suffixes ``describe`` spells, keeping the ``#`` and ``[]`` marks. :Arguments: * **name** : string implicit .. _function-rst_label_describe_type_short_TypeDecl_q_: .. das:function:: describe_type_short(td: TypeDecl?) : string Spells a type the way the reference manual does: aliases by name, containers and callables structurally, everything else through ``describe`` with its qualifiers dropped. :Arguments: * **td** : :ref:`TypeDecl `?