Skip to content

Commit 62717d4

Browse files
committed
---
yaml --- r: 223204 b: refs/heads/auto c: edca562 h: refs/heads/master v: v3
1 parent 6e00654 commit 62717d4

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: ad5927870cd32c5feb7f42dc4bca4a1b21e61a0e
11+
refs/heads/auto: edca562c87362c80e409f53d28e19617ca44646a
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ use ast::{SelfExplicit, SelfRegion, SelfStatic, SelfValue};
5151
use ast::{Delimited, SequenceRepetition, TokenTree, TraitItem, TraitRef};
5252
use ast::{TtDelimited, TtSequence, TtToken};
5353
use ast::{TupleVariantKind, Ty, Ty_, TypeBinding};
54+
use ast::{TyMac};
5455
use ast::{TyFixedLengthVec, TyBareFn, TyTypeof, TyInfer};
5556
use ast::{TyParam, TyParamBound, TyParen, TyPath, TyPolyTraitRef, TyPtr};
5657
use ast::{TyRptr, TyTup, TyU32, TyVec, UnUniq};
@@ -1369,8 +1370,20 @@ impl<'a> Parser<'a> {
13691370
} else if self.check(&token::ModSep) ||
13701371
self.token.is_ident() ||
13711372
self.token.is_path() {
1372-
// NAMED TYPE
1373-
try!(self.parse_ty_path())
1373+
let path = try!(self.parse_path(LifetimeAndTypesWithoutColons));
1374+
if self.check(&token::Not) {
1375+
// MACRO INVOCATION
1376+
try!(self.bump());
1377+
let delim = try!(self.expect_open_delim());
1378+
let tts = try!(self.parse_seq_to_end(&token::CloseDelim(delim),
1379+
seq_sep_none(),
1380+
|p| p.parse_token_tree()));
1381+
let hi = self.span.hi;
1382+
TyMac(spanned(lo, hi, MacInvocTT(path, tts, EMPTY_CTXT)))
1383+
} else {
1384+
// NAMED TYPE
1385+
TyPath(None, path)
1386+
}
13741387
} else if try!(self.eat(&token::Underscore) ){
13751388
// TYPE TO BE INFERRED
13761389
TyInfer

0 commit comments

Comments
 (0)