Skip to content

Commit 7824b8d

Browse files
committed
---
yaml --- r: 123441 b: refs/heads/auto c: 91357a9 h: refs/heads/master i: 123439: 31b6a60 v: v3
1 parent 496782c commit 7824b8d

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 4989a56448c7e3047e0538ff4ef54c49db8a5a4f
16+
refs/heads/auto: 91357a9c4eebf9ac9ff2b5c4ab5b27496cf818cd
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libsyntax/parse/token.rs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,25 @@ pub enum Token {
8484
LIT_INT(i64, ast::IntTy),
8585
LIT_UINT(u64, ast::UintTy),
8686
LIT_INT_UNSUFFIXED(i64),
87-
LIT_FLOAT(ast::Ident, ast::FloatTy),
88-
LIT_FLOAT_UNSUFFIXED(ast::Ident),
89-
LIT_STR(ast::Ident),
90-
LIT_STR_RAW(ast::Ident, uint), /* raw str delimited by n hash symbols */
87+
LIT_FLOAT(Ident, ast::FloatTy),
88+
LIT_FLOAT_UNSUFFIXED(Ident),
89+
LIT_STR(Ident),
90+
LIT_STR_RAW(Ident, uint), /* raw str delimited by n hash symbols */
9191
LIT_BINARY(Rc<Vec<u8>>),
9292
LIT_BINARY_RAW(Rc<Vec<u8>>, uint), /* raw binary str delimited by n hash symbols */
9393

9494
/* Name components */
9595
/// An identifier contains an "is_mod_name" boolean,
9696
/// indicating whether :: follows this token with no
9797
/// whitespace in between.
98-
IDENT(ast::Ident, bool),
98+
IDENT(Ident, bool),
9999
UNDERSCORE,
100-
LIFETIME(ast::Ident),
100+
LIFETIME(Ident),
101101

102102
/* For interpolation */
103103
INTERPOLATED(Nonterminal),
104104

105-
DOC_COMMENT(ast::Ident),
105+
DOC_COMMENT(Ident),
106106
EOF,
107107
}
108108

@@ -115,11 +115,12 @@ pub enum Nonterminal {
115115
NtPat( Gc<ast::Pat>),
116116
NtExpr(Gc<ast::Expr>),
117117
NtTy( P<ast::Ty>),
118-
// see IDENT, above, for meaning of bool in NtIdent:
119-
NtIdent(Box<ast::Ident>, bool),
120-
NtMeta(Gc<ast::MetaItem>), // stuff inside brackets for attributes
118+
/// See IDENT, above, for meaning of bool in NtIdent:
119+
NtIdent(Box<Ident>, bool),
120+
/// Stuff inside brackets for attributes
121+
NtMeta(Gc<ast::MetaItem>),
121122
NtPath(Box<ast::Path>),
122-
NtTT( Gc<ast::TokenTree>), // needs @ed to break a circularity
123+
NtTT( Gc<ast::TokenTree>), // needs Gc'd to break a circularity
123124
NtMatchers(Vec<ast::Matcher> )
124125
}
125126

@@ -683,20 +684,20 @@ pub fn gensym(s: &str) -> Name {
683684

684685
/// Maps a string to an identifier with an empty syntax context.
685686
#[inline]
686-
pub fn str_to_ident(s: &str) -> ast::Ident {
687-
ast::Ident::new(intern(s))
687+
pub fn str_to_ident(s: &str) -> Ident {
688+
Ident::new(intern(s))
688689
}
689690

690691
/// Maps a string to a gensym'ed identifier.
691692
#[inline]
692-
pub fn gensym_ident(s: &str) -> ast::Ident {
693-
ast::Ident::new(gensym(s))
693+
pub fn gensym_ident(s: &str) -> Ident {
694+
Ident::new(gensym(s))
694695
}
695696

696697
// create a fresh name that maps to the same string as the old one.
697698
// note that this guarantees that str_ptr_eq(ident_to_string(src),interner_get(fresh_name(src)));
698699
// that is, that the new name and the old one are connected to ptr_eq strings.
699-
pub fn fresh_name(src: &ast::Ident) -> Name {
700+
pub fn fresh_name(src: &Ident) -> Name {
700701
let interner = get_ident_interner();
701702
interner.gensym_copy(src.name)
702703
// following: debug version. Could work in final except that it's incompatible with
@@ -767,8 +768,8 @@ mod test {
767768
use ast;
768769
use ext::mtwt;
769770

770-
fn mark_ident(id : ast::Ident, m : ast::Mrk) -> ast::Ident {
771-
ast::Ident{name:id.name,ctxt:mtwt::apply_mark(m,id.ctxt)}
771+
fn mark_ident(id : Ident, m : ast::Mrk) -> Ident {
772+
Ident{name:id.name,ctxt:mtwt::apply_mark(m,id.ctxt)}
772773
}
773774

774775
#[test] fn mtwt_token_eq_test() {

0 commit comments

Comments
 (0)