diff options
| author | bors <bors@rust-lang.org> | 2013-09-15 11:55:49 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-09-15 11:55:49 -0700 |
| commit | 29032cda8c7b97966c7f3a9380bcaa8439596cd8 (patch) | |
| tree | 1b5f389275f16de2867d2a94386974174b058393 /src/libsyntax | |
| parent | c8c3c3bdd641411134c53117f4c0a449195d1e10 (diff) | |
| parent | 2ffe0836317b896b62c72fe84786bcab1ae4c808 (diff) | |
| download | rust-29032cda8c7b97966c7f3a9380bcaa8439596cd8.tar.gz rust-29032cda8c7b97966c7f3a9380bcaa8439596cd8.zip | |
auto merge of #9168 : michaelwoerister/rust/traits, r=jdm
This pull request finally adds support for recursive type definitions and provides a stub implementation for object pointers.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index 8f620e8167b..1323db7acba 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -38,6 +38,16 @@ pub enum path_elt { path_pretty_name(Ident, u64), } +impl path_elt { + pub fn ident(&self) -> Ident { + match *self { + path_mod(ident) | + path_name(ident) | + path_pretty_name(ident, _) => ident + } + } +} + pub type path = ~[path_elt]; pub fn path_to_str_with_sep(p: &[path_elt], sep: &str, itr: @ident_interner) |
