File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
branches/try/src/librustsyntax/parse Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: beece25abefb50cb2db91e5cde1f54e239d6e20a
5
+ refs/heads/try: 8ab9efe262d20be8efc90535aeaf4ed9af47f400
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -511,9 +511,18 @@ fn parse_path_without_tps(p: parser) -> @ast::path {
511
511
let lo = p. span . lo ;
512
512
let global = eat ( p, token:: MOD_SEP ) ;
513
513
let mut ids = [ ] ;
514
- do {
514
+ loop {
515
+ let is_not_last =
516
+ p. look_ahead ( 2 u) != token:: LT
517
+ && p. look_ahead ( 1 u) == token:: MOD_SEP ;
518
+
515
519
ids += [ parse_ident ( p) ] ;
516
- } while p. look_ahead ( 1 u) != token:: LT && eat ( p, token:: MOD_SEP ) ;
520
+ if is_not_last {
521
+ expect ( p, token:: MOD_SEP ) ;
522
+ } else {
523
+ break ;
524
+ }
525
+ }
517
526
@{ span: mk_sp ( lo, p. last_span . hi ) , global: global,
518
527
idents: ids, rp: none, types: [ ] }
519
528
}
You can’t perform that action at this time.
0 commit comments