@@ -17,7 +17,6 @@ private[commons] trait MacroMetadatas extends MacroSymbols {
1717 final lazy val ReifyAnnotAT : Type = staticType(tq " $MetaPackage.reifyAnnot " )
1818 final lazy val IsAnnotatedAT : Type = staticType(tq " $MetaPackage.isAnnotated[_] " )
1919 final lazy val ReifyNameAT : Type = staticType(tq " $MetaPackage.reifyName " )
20- final lazy val ReifySourceAT : Type = staticType(tq " $MetaPackage.reifySource " )
2120 final lazy val ReifyPositionAT : Type = staticType(tq " $MetaPackage.reifyPosition " )
2221 final lazy val ReifyParamListCountAT : Type = staticType(tq " $MetaPackage.reifyParamListCount " )
2322 final lazy val ReifyFlagsAT : Type = staticType(tq " $MetaPackage.reifyFlags " )
@@ -157,15 +156,15 @@ private[commons] trait MacroMetadatas extends MacroSymbols {
157156 case t if t <:< InferAT =>
158157 val clue = annot.findArg[String ](InferAT .member(TermName (" clue" )), " " )
159158 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)
161161 case t if t <:< ReifyNameAT =>
162162 val useRawName = annot.findArg[Boolean ](ReifyNameAT .member(TermName (" useRawName" )), false )
163163 new ReifiedNameParam (ownerConstr, paramSym, useRawName)
164- case t if t <:< ReifySourceAT =>
165- new ReifiedSourceParam (ownerConstr, paramSym)
166164 case t if t <:< IsAnnotatedAT =>
167165 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 " )
169168 }
170169
171170 def compositeConstructor (param : CompositeParam ): MetadataConstructor
@@ -344,36 +343,6 @@ private[commons] trait MacroMetadatas extends MacroSymbols {
344343 Ok (q " ${if (useRawName) matchedSymbol.rawName else matchedSymbol.real.nameStr}" )
345344 }
346345
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-
377346 class ParamPositionParam (owner : MetadataConstructor , symbol : Symbol )
378347 extends DirectMetadataParam (owner, symbol) {
379348
0 commit comments