@@ -100,12 +100,15 @@ package scala.tasty.reflect
100
100
* +- Constant
101
101
*
102
102
* +- Symbol --+- PackageDefSymbol
103
- * +- ClassDefSymbol
104
- * +- TypeDefSymbol
105
- * +- TypeBindSymbol
106
- * +- DefDefSymbol
107
- * +- ValDefSymbol
108
- * +- BindSymbol
103
+ * |
104
+ * +- TypeSymbol -+- ClassDefSymbol
105
+ * | +- TypeDefSymbol
106
+ * | +- TypeBindSymbol
107
+ * |
108
+ * +- TermSymbol -+- DefDefSymbol
109
+ * | +- ValDefSymbol
110
+ * | +- BindSymbol
111
+ * |
109
112
* +- NoSymbol
110
113
*
111
114
* +- Flags
@@ -249,7 +252,7 @@ trait Kernel {
249
252
def DefDef_apply (symbol : DefDefSymbol , rhsFn : List [Type ] => List [List [Term ]] => Option [Term ])(implicit ctx : Context ): DefDef
250
253
def DefDef_copy (original : DefDef )(name : String , typeParams : List [TypeDef ], paramss : List [List [ValDef ]], tpt : TypeTree , rhs : Option [Term ])(implicit ctx : Context ): DefDef
251
254
252
- /** Tree representing a value definition in the source code This inclues `val`, `lazy val`, `var`, `object` and parameter defintions . */
255
+ /** Tree representing a value definition in the source code This inclues `val`, `lazy val`, `var`, `object` and parameter definitions . */
253
256
type ValDef <: Definition
254
257
255
258
def matchValDef (tree : Tree )(implicit ctx : Context ): Option [ValDef ]
@@ -1173,12 +1176,16 @@ trait Kernel {
1173
1176
1174
1177
def PackageDefSymbol_tree (self : PackageDefSymbol )(implicit ctx : Context ): PackageDef
1175
1178
1179
+ type TypeSymbol <: Symbol
1180
+
1181
+ def matchTypeSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeSymbol ]
1182
+
1176
1183
/** Symbol of a class definition. This includes anonymous class definitions and the class of a module object. */
1177
- type ClassDefSymbol <: Symbol
1184
+ type ClassDefSymbol <: TypeSymbol
1178
1185
1179
1186
def matchClassDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ClassDefSymbol ]
1180
1187
1181
- /** ClassDef tree of this defintion */
1188
+ /** ClassDef tree of this definition */
1182
1189
def ClassDefSymbol_tree (self : ClassDefSymbol )(implicit ctx : Context ): ClassDef
1183
1190
1184
1191
/** Fields directly declared in the class */
@@ -1214,7 +1221,7 @@ trait Kernel {
1214
1221
def ClassDefSymbol_of (fullName : String )(implicit ctx : Context ): ClassDefSymbol
1215
1222
1216
1223
/** Symbol of a type (parameter or member) definition. */
1217
- type TypeDefSymbol <: Symbol
1224
+ type TypeDefSymbol <: TypeSymbol
1218
1225
1219
1226
def matchTypeDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeDefSymbol ]
1220
1227
@@ -1224,30 +1231,34 @@ trait Kernel {
1224
1231
def TypeDefSymbol_tree (self : TypeDefSymbol )(implicit ctx : Context ): TypeDef
1225
1232
1226
1233
/** Symbol representing a bind definition. */
1227
- type TypeBindSymbol <: Symbol
1234
+ type TypeBindSymbol <: TypeSymbol
1228
1235
1229
1236
def matchTypeBindSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeBindSymbol ]
1230
1237
1231
1238
/** TypeBind pattern of this definition */
1232
1239
def TypeBindSymbol_tree (self : TypeBindSymbol )(implicit ctx : Context ): TypeTree_TypeBind
1233
1240
1241
+ type TermSymbol <: Symbol
1242
+
1243
+ def matchTermSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TermSymbol ]
1244
+
1234
1245
/** Symbol representing a method definition. */
1235
- type DefDefSymbol <: Symbol
1246
+ type DefDefSymbol <: TermSymbol
1236
1247
1237
1248
def matchDefDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [DefDefSymbol ]
1238
1249
1239
- /** DefDef tree of this defintion */
1250
+ /** DefDef tree of this definition */
1240
1251
def DefDefSymbol_tree (self : DefDefSymbol )(implicit ctx : Context ): DefDef
1241
1252
1242
- /** Signature of this defintion */
1253
+ /** Signature of this definition */
1243
1254
def DefDefSymbol_signature (self : DefDefSymbol )(implicit ctx : Context ): Signature
1244
1255
1245
1256
/** Symbol representing a value definition. This includes `val`, `lazy val`, `var`, `object` and parameter definitions. */
1246
- type ValDefSymbol <: Symbol
1257
+ type ValDefSymbol <: TermSymbol
1247
1258
1248
1259
def matchValDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ValDefSymbol ]
1249
1260
1250
- /** ValDef tree of this defintion */
1261
+ /** ValDef tree of this definition */
1251
1262
def ValDefSymbol_tree (self : ValDefSymbol )(implicit ctx : Context ): ValDef
1252
1263
1253
1264
/** The class symbol of the companion module class */
@@ -1256,7 +1267,7 @@ trait Kernel {
1256
1267
def ValDefSymbol_companionClass (self : ValDefSymbol )(implicit ctx : Context ): Option [ClassDefSymbol ]
1257
1268
1258
1269
/** Symbol representing a bind definition. */
1259
- type BindSymbol <: Symbol
1270
+ type BindSymbol <: TermSymbol
1260
1271
1261
1272
def matchBindSymbol (symbol : Symbol )(implicit ctx : Context ): Option [BindSymbol ]
1262
1273
0 commit comments