pub trait Scopes {
// Required methods
fn head_kind(&self, name: &str) -> Option<HeadKind>;
fn open(&mut self);
fn bind(&mut self, name: &str, span: Span, kind: BinderKind);
fn close(&mut self);
fn reference(&mut self, node: &Spanned, name: &str, opaque: bool);
// Provided methods
fn head(&mut self, _node: &Spanned, _name: &str, _kind: HeadKind) { ... }
fn template_symbol(&mut self, _node: &Spanned, _name: &str) { ... }
}Expand description
A pass over the binder grammar. The walker calls these in source order.
Required Methods§
Sourcefn head_kind(&self, name: &str) -> Option<HeadKind>
fn head_kind(&self, name: &str) -> Option<HeadKind>
Which arbiter claims name as a head, if any. None walks the call
as an ordinary application.
Sourcefn bind(&mut self, name: &str, span: Span, kind: BinderKind)
fn bind(&mut self, name: &str, span: Span, kind: BinderKind)
name is bound in the innermost open frame.
Provided Methods§
Sourcefn head(&mut self, _node: &Spanned, _name: &str, _kind: HeadKind)
fn head(&mut self, _node: &Spanned, _name: &str, _kind: HeadKind)
The head of a special form or a macro call — not a reference to a binding, but still a name the program writes.
Sourcefn template_symbol(&mut self, _node: &Spanned, _name: &str)
fn template_symbol(&mut self, _node: &Spanned, _name: &str)
A symbol inside a quasiquoted template, outside any unquote: data at
expansion, code once the expansion runs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".