diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-03-09 16:10:11 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-03-09 16:10:11 -0800 |
| commit | b7d387434981921bdfb4632a3512e28277b83810 (patch) | |
| tree | 2e22537bfa1997bbdc58a8e5f7241762743541f3 /src/rustc/syntax/parse/parser.rs | |
| parent | 7b938d890323131d61af4f9383fb5b595cfb5694 (diff) | |
rustc: Wrap regions in a node ID
Diffstat (limited to 'src/rustc/syntax/parse/parser.rs')
| -rw-r--r-- | src/rustc/syntax/parse/parser.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rustc/syntax/parse/parser.rs b/src/rustc/syntax/parse/parser.rs index d7f0982adde..95c7383cb66 100644 --- a/src/rustc/syntax/parse/parser.rs +++ b/src/rustc/syntax/parse/parser.rs @@ -417,7 +417,7 @@ fn parse_ret_ty(p: parser) -> (ast::ret_style, @ast::ty) { } fn parse_region(p: parser) -> ast::region { - alt p.token { + let region_ = alt p.token { token::IDENT(sid, _) if p.look_ahead(1u) == token::DOT { let string = p.get_str(sid); p.bump(); p.bump(); @@ -428,7 +428,8 @@ fn parse_region(p: parser) -> ast::region { } } _ { ast::re_inferred } - } + }; + ret {id: p.get_id(), node: region_}; } fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty { |
