fn parse_dot_suffix(&mut self,
                        ident: Ident,
                        ident_span: Span,
                        self_value: P<Expr>,
                        lo: BytePos)
                        -> PResult<'a, P<Expr>> {
        let (_, tys, bindings) = if self.eat(&token::ModSep) {
            try!(self.expect_lt());
            try!(self.parse_generic_values_after_lt())
        } else {
            (Vec::new(), Vec::new(), Vec::new())
        };

        if !bindings.is_empty() {
            let last_span = self.last_span;
            self.span_err(last_span, "type bindings are only permitted on trait paths");
        }

        Ok(match self.token {
            // expr.f() method call.
            token::OpenDelim(token::Paren) => {
                let mut es = try!(self.parse_unspanned_seq(
                    &token::OpenDelim(token::Paren),
                    &token::CloseDelim(token::Paren),
                    SeqSep::trailing_allowed(token::Comma),
                    |p| Ok(try!(p.parse_expr()))
                ));
                let hi = self.last_span.hi;

                es.insert(0, self_value);
                let id = spanned(ident_span.lo, ident_span.hi, ident);
                let nd = self.mk_method_call(id, tys, es);
                self.mk_expr(lo, hi, nd, None)
            }
            // Field access.
            _ => {
                if !tys.is_empty() {
                    let last_span = self.last_span;
                    self.span_err(last_span,
                                  "field expressions may not \
                                   have type parameters");
                }

                let id = spanned(ident_span.lo, ident_span.hi, ident);
                let field = self.mk_field(self_value, id);
                self.mk_expr(lo, ident_span.hi, field, None)
            }
        })
    }
// Assuming we have just parsed `.foo` (i.e., a dot and an ident), continue
// parsing into an expression.
Assuming we have just parsed `.foo` , continue
parsing into an expression.
Assuming we have just parsed ` . foo ` continue parsing into an expression .
fn parse_dot_suffix(&mut self,
                        ident: Ident,
                        ident_span: Span,
                        self_value: P<Expr>,
                        lo: BytePos)
                        -> PResult<'a, P<Expr>> {
        let (_, tys, bindings) = if self.eat(&token::ModSep) {
            try!(self.expect_lt());
            try!(self.parse_generic_values_after_lt())
        } else {
            (Vec::new(), Vec::new(), Vec::new())
        };
        if !bindings.is_empty() {
            let last_span = self.last_span;
            self.span_err(last_span, "type bindings are only permitted on trait paths");
        }
        Ok(match self.token {
            // expr.f() method call.
            token::OpenDelim(token::Paren) => {
                let mut es = try!(self.parse_unspanned_seq(
                    &token::OpenDelim(token::Paren),
                    &token::CloseDelim(token::Paren),
                    SeqSep::trailing_allowed(token::Comma),
                    |p| Ok(try!(p.parse_expr()))
                ));
                let hi = self.last_span.hi;
                es.insert(0, self_value);
                let id = spanned(ident_span.lo, ident_span.hi, ident);
                let nd = self.mk_method_call(id, tys, es);
                self.mk_expr(lo, hi, nd, None)
            }
            // Field access.
            _ => {
                if !tys.is_empty() {
                    let last_span = self.last_span;
                    self.span_err(last_span,
                                  "field expressions may not \
                                   have type parameters");
                }
                let id = spanned(ident_span.lo, ident_span.hi, ident);
                let field = self.mk_field(self_value, id);
                self.mk_expr(lo, ident_span.hi, field, None)
            }
        })
    }
fn parse_dot_suffix ( & mut self , ident : Ident , ident_span : Span , self_value : P < Expr > , lo : BytePos ) -> PResult < ' a , P < Expr > > { let ( _ , tys , bindings ) = if self . eat ( & token :: ModSep ) { try ! ( self expect_lt ( ) ) ; try ! ( self parse_generic_values_after_lt ( ) ) } else { ( Vec :: new ( ) , Vec :: new ( ) , Vec :: new ( ) ) } ; if ! bindings . is_empty ( ) { let last_span = self . last_span ; self . span_err ( last_span , " " ) ; } Ok ( match self . token { // expr.f() method call. token :: OpenDelim ( token :: Paren ) => { let mut es = try ! ( self parse_unspanned_seq ( token OpenDelim ( token Paren ) token CloseDelim ( token Paren ) SeqSep trailing_allowed ( token Comma ) p Ok ( try ( p parse_expr ( ) ) ) ) ) ; let hi = self . last_span . hi ; es . insert ( 0 , self_value ) ; let id = spanned ( ident_span . lo , ident_span . hi , ident ) ; let nd = self . mk_method_call ( id , tys , es ) ; self . mk_expr ( lo , hi , nd , None ) } // Field access. _ => { if ! tys . is_empty ( ) { let last_span = self . last_span ; self . span_err ( last_span , " \
 " ) ; } let id = spanned ( ident_span . lo , ident_span . hi , ident ) ; let field = self . mk_field ( self_value , id ) ; self . mk_expr ( lo , ident_span . hi , field , None ) } } ) }
Assuming we have just parsed `.foo` (i.e., a dot and an ident), continue
parsing into an expression.
Assuming we have just parsed ` . foo ` ( i . e . a dot and an ident ) continue parsing into an expression .
&mut self
ident
Ident
ident_span
Span
self_value
P<Expr>
lo
BytePos
&mut self
ident
Ident
ident_span
Span
self_value
P<Expr>
lo
BytePos