pub trait SyntaxNodeExt {
// Required methods
fn except_comments(&self) -> impl Iterator<Item = SyntaxToken> + '_;
fn rule_exceptions(&self) -> HashSet<String>;
fn is_rule_excepted(&self, id: &str) -> bool;
}
Expand description
An extension trait for syntax nodes.
Required Methods§
Sourcefn except_comments(&self) -> impl Iterator<Item = SyntaxToken> + '_
fn except_comments(&self) -> impl Iterator<Item = SyntaxToken> + '_
Gets an iterator over the @except
comments for a syntax node.
Sourcefn rule_exceptions(&self) -> HashSet<String>
fn rule_exceptions(&self) -> HashSet<String>
Gets the AST node’s rule exceptions set.
The set is the comma-delimited list of rule identifiers that follows a
#@ except:
comment.
Sourcefn is_rule_excepted(&self, id: &str) -> bool
fn is_rule_excepted(&self, id: &str) -> bool
Determines if a given rule id is excepted for the syntax node.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.