File tree Expand file tree Collapse file tree 4 files changed +15
-25
lines changed Expand file tree Collapse file tree 4 files changed +15
-25
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: fe8a31e56992a712b532350596af05186ac90613
5
+ refs/heads/try: 7f1ea3ef6a92eb82ae66c47954ed955eba6028b1
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -666,6 +666,15 @@ fn parse_path(p: parser) -> @ast::path {
666
666
{ global: global, idents: ids, types: [ ] } ) ;
667
667
}
668
668
669
+ fn parse_value_path ( p : parser ) -> @ast:: path {
670
+ let pt = parse_path ( p) ;
671
+ let last_word = pt. node . idents [ vec:: len ( pt. node . idents ) -1 u] ;
672
+ if p. bad_expr_words . contains_key ( last_word) {
673
+ p. fatal ( "found " + last_word + " in expression position" ) ;
674
+ }
675
+ pt
676
+ }
677
+
669
678
fn parse_path_and_ty_param_substs ( p : parser , colons : bool ) -> @ast:: path {
670
679
let lo = p. span . lo ;
671
680
let path = parse_path ( p) ;
@@ -1510,11 +1519,11 @@ fn parse_pat(p: parser) -> @ast::pat {
1510
1519
pat = ast:: pat_lit ( val) ;
1511
1520
}
1512
1521
} else if is_plain_ident ( p) &&
1513
- alt p. look_ahead ( 1 u) {
1514
- token:: LPAREN | token:: LBRACKET | token:: LT { false }
1515
- _ { true }
1516
- } {
1517
- let name = parse_path ( p) ;
1522
+ alt p. look_ahead ( 1 u) {
1523
+ token:: LPAREN | token:: LBRACKET | token:: LT { false }
1524
+ _ { true }
1525
+ } {
1526
+ let name = parse_value_path ( p) ;
1518
1527
let sub = if eat ( p, token:: AT ) { some ( parse_pat ( p) ) }
1519
1528
else { none } ;
1520
1529
pat = ast:: pat_ident ( name, sub) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments