Skip to main content

default_func_space_name

Function default_func_space_name 

Source
pub fn default_func_space_name<'a, 'tree>(
    node: &Node<'tree>,
    code: &'a [u8],
    _ancestors: Ancestors<'tree, '_>,
) -> Option<&'a str>
Expand description

The default space name: the node’s name field, else <anonymous>.

A free function as well as the trait default so a language that needs to name a few kinds specially can delegate the rest rather than restate the rule — <get> / <set> / <init> / <static-init> in Kotlin, Java and Groovy all do (#1184). Calling Self::… there would recurse.