Skip to content

Commit 863932d

Browse files
committed
---
yaml --- r: 233128 b: refs/heads/beta c: edca562 h: refs/heads/master v: v3
1 parent a1a6d04 commit 863932d

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: ad5927870cd32c5feb7f42dc4bca4a1b21e61a0e
26+
refs/heads/beta: edca562c87362c80e409f53d28e19617ca44646a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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)