@@ -784,15 +784,19 @@ pub enum Expr_ {
784
784
ExprBox ( Option < P < Expr > > , P < Expr > ) ,
785
785
/// An array (`[a, b, c, d]`)
786
786
ExprVec ( Vec < P < Expr > > ) ,
787
- /// A function cal
787
+ /// A function call
788
+ /// The first field resolves to the function itself,
789
+ /// and the second field is the list of arguments
788
790
ExprCall ( P < Expr > , Vec < P < Expr > > ) ,
789
791
/// A method call (`x.foo::<Bar, Baz>(a, b, c, d)`)
790
792
/// The `SpannedIdent` is the identifier for the method name
791
793
/// The vector of `Ty`s are the ascripted type parameters for the method
792
794
/// (within the angle brackets)
793
795
/// The first element of the vector of `Expr`s is the expression that evaluates
794
- /// to the object on which the method is being called on, and the remaining elements
795
- /// are the arguments
796
+ /// to the object on which the method is being called on (the receiver),
797
+ /// and the remaining elements are the rest of the arguments.
798
+ /// Thus, `x.foo::<Bar, Baz>(a, b, c, d)` is represented as
799
+ /// `ExprMethodCall(foo, [Bar, Baz], [x, a, b, c, d])`
796
800
ExprMethodCall ( SpannedIdent , Vec < P < Ty > > , Vec < P < Expr > > ) ,
797
801
/// A tuple (`(a, b, c ,d)`)
798
802
ExprTup ( Vec < P < Expr > > ) ,
@@ -829,7 +833,8 @@ pub enum Expr_ {
829
833
/// `'label loop { block }`
830
834
// FIXME #6993: change to Option<Name> ... or not, if these are hygienic.
831
835
ExprLoop ( P < Block > , Option < Ident > ) ,
832
- /// A `match` block, with a desugar source
836
+ /// A `match` block, with a source that indicates whether or not it is
837
+ /// the result of a desugaring, and if so, which kind
833
838
ExprMatch ( P < Expr > , Vec < Arm > , MatchSource ) ,
834
839
/// A closure (for example, `move |a, b, c| {a + b + c}`)
835
840
ExprClosure ( CaptureClause , P < FnDecl > , P < Block > ) ,
@@ -1094,7 +1099,7 @@ pub enum Mac_ {
1094
1099
1095
1100
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug , Copy ) ]
1096
1101
pub enum StrStyle {
1097
- /// A regular string, like `"fooo "`
1102
+ /// A regular string, like `"foo "`
1098
1103
CookedStr ,
1099
1104
/// A raw string, like `r##"foo"##`
1100
1105
/// The uint is the number of `#` symbols used
0 commit comments