@@ -678,6 +678,7 @@ pub enum UnOp {
678
678
UnNeg
679
679
}
680
680
681
+ /// A statement
681
682
pub type Stmt = Spanned < Stmt_ > ;
682
683
683
684
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
@@ -722,6 +723,7 @@ pub enum LocalSource {
722
723
pub struct Local {
723
724
pub pat : P < Pat > ,
724
725
pub ty : Option < P < Ty > > ,
726
+ /// Initializer expression to set the value, if any
725
727
pub init : Option < P < Expr > > ,
726
728
pub id : NodeId ,
727
729
pub span : Span ,
@@ -768,6 +770,7 @@ pub enum UnsafeSource {
768
770
UserProvided ,
769
771
}
770
772
773
+ /// An expression
771
774
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
772
775
pub struct Expr {
773
776
pub id : NodeId ,
@@ -981,7 +984,6 @@ pub enum KleeneOp {
981
984
/// The RHS of an MBE macro is the only place `SubstNt`s are substituted.
982
985
/// Nothing special happens to misnamed or misplaced `SubstNt`s.
983
986
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
984
- #[ doc="For macro invocations; parsing is delegated to the macro" ]
985
987
pub enum TokenTree {
986
988
/// A single token
987
989
TtToken ( Span , token:: Token ) ,
@@ -1092,10 +1094,14 @@ pub enum Mac_ {
1092
1094
1093
1095
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug , Copy ) ]
1094
1096
pub enum StrStyle {
1097
+ /// A regular string, like `"fooo"`
1095
1098
CookedStr ,
1099
+ /// A raw string, like `r##"foo"##`
1100
+ /// The uint is the number of `#` symbols used
1096
1101
RawStr ( usize )
1097
1102
}
1098
1103
1104
+ /// A literal
1099
1105
pub type Lit = Spanned < Lit_ > ;
1100
1106
1101
1107
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug , Copy ) ]
@@ -1133,13 +1139,21 @@ impl LitIntType {
1133
1139
1134
1140
#[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , Hash , Debug ) ]
1135
1141
pub enum Lit_ {
1142
+ /// A string literal (`"foo"`)
1136
1143
LitStr ( InternedString , StrStyle ) ,
1144
+ /// A byte string (`b"foo"`)
1137
1145
LitBinary ( Rc < Vec < u8 > > ) ,
1146
+ /// A byte char (`b'f'`)
1138
1147
LitByte ( u8 ) ,
1148
+ /// A character literal (`'a'`)
1139
1149
LitChar ( char ) ,
1150
+ /// An integer liteal (`1u8`)
1140
1151
LitInt ( u64 , LitIntType ) ,
1152
+ /// A float literal (`1f64` or `1E10f64`)
1141
1153
LitFloat ( InternedString , FloatTy ) ,
1154
+ /// A float literal without a suffix (`1.0 or 1.0E10`)
1142
1155
LitFloatUnsuffixed ( InternedString ) ,
1156
+ /// A boolean literal
1143
1157
LitBool ( bool ) ,
1144
1158
}
1145
1159
0 commit comments