Skip to content

Commit 2b7f1a4

Browse files
committed
parser comments only
1 parent c73a9c9 commit 2b7f1a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ pub impl Parser {
763763
return ty_rptr(opt_lifetime, mt);
764764
}
765765

766+
// parse an optional mode.
766767
fn parse_arg_mode(&self) -> mode {
767768
if self.eat(&token::BINOP(token::MINUS)) {
768769
self.obsolete(*self.span, ObsoleteMode);
@@ -829,6 +830,7 @@ pub impl Parser {
829830
ty: t, pat: pat, id: self.get_id() }
830831
}
831832
833+
// parse a single function argument
832834
fn parse_arg(&self) -> arg_or_capture_item {
833835
either::Left(self.parse_arg_general(true))
834836
}
@@ -2883,6 +2885,8 @@ pub impl Parser {
28832885
self.bump();
28842886
}
28852887

2888+
// parse the argument list and result type of a function
2889+
// that may have a self type.
28862890
fn parse_fn_decl_with_self(
28872891
&self,
28882892
parse_arg_fn:
@@ -3056,6 +3060,7 @@ pub impl Parser {
30563060
}
30573061
}
30583062

3063+
// parse the name and optional generic types of a function header.
30593064
fn parse_fn_header(&self) -> (ident, ast::Generics) {
30603065
let id = self.parse_ident();
30613066
let generics = self.parse_generics();
@@ -3073,6 +3078,7 @@ pub impl Parser {
30733078
span: mk_sp(lo, hi) }
30743079
}
30753080

3081+
// parse an item-position function declaration.
30763082
fn parse_item_fn(&self, purity: purity, abis: AbiSet) -> item_info {
30773083
let (ident, generics) = self.parse_fn_header();
30783084
let decl = self.parse_fn_decl(|p| p.parse_arg());

0 commit comments

Comments
 (0)