@@ -17,7 +17,6 @@ private[commons] trait MacroMetadatas extends MacroSymbols {
17
17
final lazy val ReifyAnnotAT : Type = staticType(tq " $MetaPackage.reifyAnnot " )
18
18
final lazy val IsAnnotatedAT : Type = staticType(tq " $MetaPackage.isAnnotated[_] " )
19
19
final lazy val ReifyNameAT : Type = staticType(tq " $MetaPackage.reifyName " )
20
- final lazy val ReifySourceAT : Type = staticType(tq " $MetaPackage.reifySource " )
21
20
final lazy val ReifyPositionAT : Type = staticType(tq " $MetaPackage.reifyPosition " )
22
21
final lazy val ReifyParamListCountAT : Type = staticType(tq " $MetaPackage.reifyParamListCount " )
23
22
final lazy val ReifyFlagsAT : Type = staticType(tq " $MetaPackage.reifyFlags " )
@@ -157,15 +156,15 @@ private[commons] trait MacroMetadatas extends MacroSymbols {
157
156
case t if t <:< InferAT =>
158
157
val clue = annot.findArg[String ](InferAT .member(TermName (" clue" )), " " )
159
158
new ImplicitParam (ownerConstr, paramSym, clue)
160
- case t if t <:< ReifyAnnotAT => new ReifiedAnnotParam (ownerConstr, paramSym)
159
+ case t if t <:< ReifyAnnotAT =>
160
+ new ReifiedAnnotParam (ownerConstr, paramSym)
161
161
case t if t <:< ReifyNameAT =>
162
162
val useRawName = annot.findArg[Boolean ](ReifyNameAT .member(TermName (" useRawName" )), false )
163
163
new ReifiedNameParam (ownerConstr, paramSym, useRawName)
164
- case t if t <:< ReifySourceAT =>
165
- new ReifiedSourceParam (ownerConstr, paramSym)
166
164
case t if t <:< IsAnnotatedAT =>
167
165
new IsAnnotatedParam (ownerConstr, paramSym, t.typeArgs.head)
168
- case t => reportProblem(s " metadata param strategy $t is not allowed here " )
166
+ case t =>
167
+ reportProblem(s " metadata param strategy $t is not allowed here " )
169
168
}
170
169
171
170
def compositeConstructor (param : CompositeParam ): MetadataConstructor
@@ -344,36 +343,6 @@ private[commons] trait MacroMetadatas extends MacroSymbols {
344
343
Ok (q " ${if (useRawName) matchedSymbol.rawName else matchedSymbol.real.nameStr}" )
345
344
}
346
345
347
- class ReifiedSourceParam (owner : MetadataConstructor , symbol : Symbol )
348
- extends DirectMetadataParam (owner, symbol) {
349
-
350
- if (! (actualType =:= SymbolSourceTpe )) {
351
- reportProblem(s " its type is not SymbolSource " )
352
- }
353
-
354
- def tryMaterializeFor (matchedSymbol : MatchedSymbol ): Res [Tree ] = {
355
- val sym = matchedSymbol.real.symbol
356
- sym.pos match {
357
- case NoPosition =>
358
- FailMsg (s " source information not available for ${matchedSymbol.real.description}" )
359
- case pos => Ok {
360
- val source = pos.source
361
- val startPos = pos.withPoint(pos.start)
362
- val endPos = pos.withPoint(pos.end)
363
- q """
364
- $MetaPackage.SymbolSource(
365
- ${source.path},
366
- ${source.file.name},
367
- $MetaPackage.SourceOffset( ${startPos.point}, ${startPos.line}, ${startPos.column}),
368
- $MetaPackage.SourceOffset( ${endPos.point}, ${endPos.line}, ${endPos.column}),
369
- ${new String (source.content, pos.start, pos.end - pos.start)}
370
- )
371
- """
372
- }
373
- }
374
- }
375
- }
376
-
377
346
class ParamPositionParam (owner : MetadataConstructor , symbol : Symbol )
378
347
extends DirectMetadataParam (owner, symbol) {
379
348
0 commit comments