1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
b0VIM 7.4 1�0U=g�- erickt Erick-Tryzelaar-MBP.local ~erickt/projects/rust/rust/src/libsyntax/ast_map/mod.rs utf-8
3210 #"! U tp
� q � h � a f d � t +
s � e Y w � ad O � � { X U � � M ) ( �
�
�
�
�
�
�
�
o
\
@
?
(
� � � � � � � } i V C A @ 0 � � � � � � � W & �
�
�
�
�
�
�
�
K
J
0
� � � � � � � � \ B A � � � � � w m g e d 4 � � � \ [ 1 � � � � � � � � } g M % � � � � s Y A % $ � � � � � � x D - � � � � � Z - � � � r O EntryLocal(NodeId, &'ast Pat), EntryArg(NodeId, &'ast Pat), EntryStmt(NodeId, &'ast Stmt), EntryExpr(NodeId, &'ast Expr), EntryVariant(NodeId, &'ast Variant), EntryImplItem(NodeId, &'ast ImplItem), EntryTraitItem(NodeId, &'ast TraitItem), EntryForeignItem(NodeId, &'ast ForeignItem), EntryItem(NodeId, &'ast Item), /// All the node types, with a parent ID. NotPresent, /// Placeholder for holes in the map. enum MapEntry<'ast> { #[derive(Copy, Debug)] /// The odd layout is to bring down the total size. /// Represents an entry and its parent Node ID } NodeLifetime(&'ast Lifetime), NodeStructCtor(&'ast StructDef), /// NodeStructCtor represents a tuple struct. NodeBlock(&'ast Block), NodePat(&'ast Pat), NodeLocal(&'ast Pat), NodeArg(&'ast Pat), NodeStmt(&'ast Stmt), NodeExpr(&'ast Expr), NodeVariant(&'ast Variant), NodeImplItem(&'ast ImplItem), NodeTraitItem(&'ast TraitItem), NodeForeignItem(&'ast ForeignItem), NodeItem(&'ast Item), pub enum Node<'ast> { #[derive(Copy, Clone, Debug)] } }) s s.push_str(&e[..]); } s.push_str("::"); if !s.is_empty() { let e = itr.get(e.name()); path.fold(String::new(), |mut s, e| { let itr = token::get_ident_interner(); pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String { pub type PathElems<'a, 'b> = iter::Chain<iter::Cloned<slice::Iter<'a, PathElem>>, LinkedPath<'b>>; /// The type of the iterator used by with_path. } } } None => None } Some(node.node) *self = node.next; Some(node) => { match self.0 { fn next(&mut self) -> Option<PathElem> { type Item = PathElem; impl<'a> Iterator for LinkedPath<'a> { } } LinkedPath(Some(node)) pub fn from(node: &'a LinkedPathNode) -> LinkedPath<'a> { } LinkedPath(None) pub fn empty() -> LinkedPath<'a> { impl<'a> LinkedPath<'a> { pub struct LinkedPath<'a>(Option<&'a LinkedPathNode<'a>>); #[derive(Copy, Clone)] } next: LinkedPath<'a>, node: PathElem, pub struct LinkedPathNode<'a> { #[derive(Clone)] } } write!(f, "{}", slot) let slot = token::get_name(self.name()); fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { impl fmt::Display for PathElem { } } } PathMod(name) | PathName(name) => name match *self { pub fn name(&self) -> Name { impl PathElem { } PathName(Name) PathMod(Name), pub enum PathElem { #[derive(Clone, Copy, PartialEq, Debug)] pub mod blocks; use std::slice; use std::mem; use std::iter::{self, repeat}; use std::io; use std::fmt; use std::cell::RefCell; use arena::TypedArena; use visit::{self, Visitor}; use print::pprust; use parse::token; use fold::Folder; use codemap::{DUMMY_SP, Span, Spanned}; use ast_util; use ast::*; use abi; use self::MapEntry::*; pub use self::PathElem::*; pub use self::Node::*; // 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 //