Attribute Macro rust_sitter::extra

source ·
#[extra]
Expand description

This annotation marks a node as extra, which can safely be skipped while parsing. This is useful for handling whitespace/newlines/comments.

§Example

#[rust_sitter::extra]
struct Whitespace {
    #[rust_sitter::leaf(pattern = r"\s")]
    _whitespace: (),
}