pub enum SyntaxKind {
Show 48 variants
NAME,
TYPE,
COLON,
DESCRIPTION,
OPEN_BRACKET,
CLOSE_BRACKET,
OPTIONAL,
BODY_TEXT,
SUMMARY,
EXTENDED_SUMMARY,
STRAY_LINE,
WARNING_TYPE,
UNDERLINE,
DIRECTIVE_MARKER,
KEYWORD,
DOUBLE_COLON,
VERSION,
RETURN_TYPE,
DEFAULT_KEYWORD,
DEFAULT_SEPARATOR,
DEFAULT_VALUE,
NUMBER,
CONTENT,
GOOGLE_DOCSTRING,
GOOGLE_SECTION,
GOOGLE_SECTION_HEADER,
GOOGLE_ARG,
GOOGLE_RETURNS,
GOOGLE_YIELDS,
GOOGLE_EXCEPTION,
GOOGLE_WARNING,
GOOGLE_SEE_ALSO_ITEM,
GOOGLE_ATTRIBUTE,
GOOGLE_METHOD,
PLAIN_DOCSTRING,
NUMPY_DOCSTRING,
NUMPY_SECTION,
NUMPY_SECTION_HEADER,
NUMPY_DEPRECATION,
NUMPY_PARAMETER,
NUMPY_RETURNS,
NUMPY_YIELDS,
NUMPY_EXCEPTION,
NUMPY_WARNING,
NUMPY_SEE_ALSO_ITEM,
NUMPY_REFERENCE,
NUMPY_ATTRIBUTE,
NUMPY_METHOD,
}Expand description
Node and token kinds for all docstring styles.
Google and NumPy variants coexist in a single enum, just as Biome puts
JsIfStatement and TsInterface in one SyntaxKind.
Variants§
NAME
Section name, parameter name, exception type name, etc.
TYPE
Type annotation.
COLON
: separator.
DESCRIPTION
Description text.
OPEN_BRACKET
Opening bracket: (, [, {, or <.
CLOSE_BRACKET
Closing bracket: ), ], }, or >.
OPTIONAL
optional marker.
BODY_TEXT
Free-text section body.
SUMMARY
Summary line.
EXTENDED_SUMMARY
Extended summary paragraph.
STRAY_LINE
Stray line between sections.
WARNING_TYPE
Warning type (e.g. UserWarning).
UNDERLINE
Section header underline (----------).
DIRECTIVE_MARKER
RST directive marker (..).
KEYWORD
Keyword such as deprecated.
DOUBLE_COLON
RST double colon (::).
VERSION
Deprecation version string.
RETURN_TYPE
Return type (NumPy-style).
DEFAULT_KEYWORD
default keyword.
DEFAULT_SEPARATOR
Default value separator (= or :).
DEFAULT_VALUE
Default value text.
NUMBER
Reference number.
CONTENT
Reference content text.
GOOGLE_DOCSTRING
Root node for a Google-style docstring.
GOOGLE_SECTION
A complete Google section (header + body items).
GOOGLE_SECTION_HEADER
Section header (Args:, Returns:, etc.).
GOOGLE_ARG
A single argument entry.
GOOGLE_RETURNS
A single return value entry.
GOOGLE_YIELDS
A single yield value entry.
GOOGLE_EXCEPTION
A single exception entry.
GOOGLE_WARNING
A single warning entry.
GOOGLE_SEE_ALSO_ITEM
A single “See Also” item.
GOOGLE_ATTRIBUTE
A single attribute entry.
GOOGLE_METHOD
A single method entry.
PLAIN_DOCSTRING
Root node for a plain docstring (summary/extended summary only, no NumPy or Google style section markers). Also used for unrecognised styles such as Sphinx.
NUMPY_DOCSTRING
Root node for a NumPy-style docstring.
NUMPY_SECTION
A complete NumPy section (header + body items).
NUMPY_SECTION_HEADER
Section header (name + underline).
NUMPY_DEPRECATION
Deprecation directive block.
NUMPY_PARAMETER
A single parameter entry.
NUMPY_RETURNS
A single return value entry.
NUMPY_YIELDS
A single yield value entry.
NUMPY_EXCEPTION
A single exception entry.
NUMPY_WARNING
A single warning entry.
NUMPY_SEE_ALSO_ITEM
A single “See Also” item.
NUMPY_REFERENCE
A single reference entry.
NUMPY_ATTRIBUTE
A single attribute entry.
NUMPY_METHOD
A single method entry.
Implementations§
Trait Implementations§
Source§impl Clone for SyntaxKind
impl Clone for SyntaxKind
Source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more