syntex_syntax 0.7.0

Export of libsyntax for code generation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
b0VIM 7.43�tUR�B�ericktErick-Tryzelaar-MBP.local~erickt/projects/rust/rust-syntex/syntex_syntax/src/visit.rs	3210#"! Utp
Q��������_R��������`���������h��������fy��������]���������f<��������j���������^
jadA�Q�{XU��M)(�
�
C


�}-���f�
�
�
�
�
�
�
�
�
i
h
Q
;

�	�	�	y	x	e	N	?	=	<	��k'#��W&���sHB��U��N��W�pLF���    fn visit_impl_item(&mut self, ii: &'v ImplItem) { walk_impl_item(self, ii) }    fn visit_trait_item(&mut self, ti: &'v TraitItem) { walk_trait_item(self, ti) }    }        walk_fn(self, fk, fd, b, s)    fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl, b: &'v Block, s: Span, _: NodeId) {    fn visit_generics(&mut self, g: &'v Generics) { walk_generics(self, g) }    fn visit_ty(&mut self, t: &'v Ty) { walk_ty(self, t) }    fn visit_expr_post(&mut self, _ex: &'v Expr) { }    fn visit_expr(&mut self, ex: &'v Expr) { walk_expr(self, ex) }    fn visit_decl(&mut self, d: &'v Decl) { walk_decl(self, d) }    fn visit_pat(&mut self, p: &'v Pat) { walk_pat(self, p) }    fn visit_arm(&mut self, a: &'v Arm) { walk_arm(self, a) }    fn visit_stmt(&mut self, s: &'v Stmt) { walk_stmt(self, s) }    fn visit_block(&mut self, b: &'v Block) { walk_block(self, b) }    fn visit_local(&mut self, l: &'v Local) { walk_local(self, l) }    fn visit_item(&mut self, i: &'v Item) { walk_item(self, i) }    fn visit_foreign_item(&mut self, i: &'v ForeignItem) { walk_foreign_item(self, i) }    fn visit_mod(&mut self, m: &'v Mod, _s: Span, _n: NodeId) { walk_mod(self, m) }    }        self.visit_name(span, ident.name);    fn visit_ident(&mut self, span: Span, ident: Ident) {    }        // Nothing to do.    fn visit_name(&mut self, _span: Span, _name: Name) {pub trait Visitor<'v> : Sized {/// new default implementation gets introduced.)/// to monitor future changes to `Visitor` in case a new method with a/// explicitly, you need to override each method.  (And you also need/// If you want to ensure that your code handles every variant////// e.g. the `visit_mod` method by default calls `visit::walk_mod`./// the substructure of the input via the corresponding `walk` method;/// overridden.  Each method's default implementation recursively visits/// Each method of the Visitor trait is a hook to be potentially}    FkFnBlock,    /// proc(x, y) ...    /// |x, y| ...    FkMethod(Ident, &'a MethodSig, Option<Visibility>),    /// fn foo(&self)    FkItemFn(Ident, &'a Generics, Unsafety, Constness, Abi, Visibility),    /// fn foo() or extern "Abi" fn foo()pub enum FnKind<'a> {#[derive(Copy, Clone)]use owned_slice::OwnedSlice;use ptr::P;use codemap::Span;use ast;use ast::*;use abi::Abi;pub use self::FnKind::*;//! those that are created by the expansion of a macro.//! instance, a walker looking for item names in a module will miss all of//! Note: walking an AST before macro expansion is probably a bad idea. For//!//! particular relies on this property.//! execute before AST node B, then A is visited first.  The borrow checker in//! with respect to the CFG implied by the AST), meaning that if AST node A may//! of a function in "execution order" (more concretely, reverse post-order//! Note: it is an important invariant that the default visitor walks the body//!//! deeper traversal by doing nothing.//! call `visit::walk_*` to apply the default traversal algorithm, or prevent//! happens with its node, it can do its own traversal of the node's children,//! AST walker. Each overridden visit method has full control over what// except according to those terms.// option. This file may not be copied, modified, or distributed// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or//// http://rust-lang.org/COPYRIGHT.// file at the top-level directory of this distribution and at// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHTad��
��vpH$����}    }        visitor.visit_attribute(attr);    for attr in &arm.attrs {    visitor.visit_expr(&*arm.body);    walk_expr_opt(visitor, &arm.guard);    }        visitor.visit_pat(&**pattern)    for pattern in &arm.pats {pub fn walk_arm<'v, V: Visitor<'v>>(visitor: &mut V, arm: &'v Arm) {