@@ -147,25 +147,25 @@ object SourceTextExtraction {
147
147
// visitMethodExpr as trailing params on each recursive call
148
148
@ tailrec def traversal (trees : List [(Path [g.type ], Int , Tree )], acc : A ): A = trees match {
149
149
case Nil => acc
150
- case (path, order , tree) :: rs =>
150
+ case (path, _ , tree) :: rs =>
151
151
tree match {
152
152
153
- case DocDef (comment, moduleDef @ ModuleDef (mods , _, impl)) =>
153
+ case DocDef (comment, moduleDef @ ModuleDef (_ , _, impl)) =>
154
154
val nextPath = moduleDef.name :: path
155
155
traversal(
156
156
impl.body.zipWithIndex.map { case (body, index) => (nextPath, index, body) } ::: rs,
157
157
visitDocComment(nextPath.reverse, comment, acc)
158
158
)
159
159
160
160
// TODO: is this needed?
161
- case DocDef (comment, classDef @ ClassDef (mods , _, Nil , impl)) =>
161
+ case DocDef (comment, classDef @ ClassDef (_ , _, Nil , impl)) =>
162
162
val nextPath = classDef.name :: path
163
163
traversal(
164
164
impl.body.zipWithIndex.map { case (body, index) => (nextPath, index, body) } ::: rs,
165
165
visitDocComment(nextPath.reverse, comment, acc)
166
166
)
167
167
168
- case DocDef (comment, q " def $tname(... $paramss ): $tpt = $expr" ) =>
168
+ case DocDef (comment, q " def $tname(... $_ ): $_ = $expr" ) =>
169
169
val nextPath = tname :: path
170
170
val nextPathReversed = nextPath.reverse
171
171
traversal(
@@ -177,31 +177,21 @@ object SourceTextExtraction {
177
177
)
178
178
)
179
179
180
- case moduleDef @ ModuleDef (mods , _, impl) =>
180
+ case moduleDef @ ModuleDef (_ , _, impl) =>
181
181
val nextPath = moduleDef.name :: path
182
182
traversal(
183
183
impl.body.zipWithIndex.map { case (body, index) => (nextPath, index, body) } ::: rs,
184
184
acc
185
185
)
186
186
187
187
// TODO: is this needed?
188
- case classDef @ ClassDef (mods , _, Nil , impl) =>
188
+ case classDef @ ClassDef (_ , _, Nil , impl) =>
189
189
val nextPath = classDef.name :: path
190
190
traversal(
191
191
impl.body.zipWithIndex.map { case (body, index) => (nextPath, index, body) } ::: rs,
192
192
acc
193
193
)
194
194
195
- /*
196
- // TODO: can this be removed?
197
- case q"def $tname(...$paramss): $tpt = $expr" =>
198
- val nextPath = tname :: path
199
- traversal(
200
- (nextPath, 0, expr) :: rs,
201
- acc
202
- )
203
- */
204
-
205
195
case q " package $ref { .. $topstats } " =>
206
196
val nextPath =
207
197
if (ref.name == termNames.EMPTY_PACKAGE_NAME ) path
0 commit comments