@@ -126,7 +126,7 @@ private[xml] object XmlParser {
126
126
)
127
127
}
128
128
129
- private def interpolation (factory : Expr [XmlFactory ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
129
+ private def interpolation (factory : Expr [XmlFactory [_] ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
130
130
import quotes .reflect ._
131
131
ofType[Any ]
132
132
.map({(value) =>
@@ -140,7 +140,7 @@ private[xml] object XmlParser {
140
140
})
141
141
}
142
142
143
- private def attribute (factory: Expr [XmlFactory ])(using Quotes ): Interpolator [Attribute ] = {
143
+ private def attribute (factory: Expr [XmlFactory [_] ])(using Quotes ): Interpolator [Attribute ] = {
144
144
def valueText (excluding: Char ) = (charRef <|> xmlAllowedChar(" <&" + excluding)).repeat(1 )
145
145
.map({data =>
146
146
import quotes .reflect ._
@@ -161,7 +161,7 @@ private[xml] object XmlParser {
161
161
.map((k,v) => Attribute (k, v.map(_.asExpr)))
162
162
}
163
163
164
- private def cdata (factory: Expr [XmlFactory ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
164
+ private def cdata (factory: Expr [XmlFactory [_] ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
165
165
given typeclass .Eithered [CodePoint , String , String ] with
166
166
def left (elem: CodePoint ): String = elem.toString
167
167
def right (elem: String ): String = elem
@@ -185,7 +185,7 @@ private[xml] object XmlParser {
185
185
})
186
186
}
187
187
188
- private def entity (factory: Expr [XmlFactory ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
188
+ private def entity (factory: Expr [XmlFactory [_] ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
189
189
(isString(" &" ) ~> xmlName <~ isString(" ;" ))
190
190
.map({name =>
191
191
import quotes .reflect ._
@@ -196,7 +196,7 @@ private[xml] object XmlParser {
196
196
.attempt
197
197
}
198
198
199
- private def text (factory: Expr [XmlFactory ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
199
+ private def text (factory: Expr [XmlFactory [_] ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
200
200
(charRef <|> xmlAllowedChar(" <&" )).repeat(1 )
201
201
.map({data =>
202
202
import quotes .reflect ._
@@ -206,7 +206,7 @@ private[xml] object XmlParser {
206
206
})
207
207
}
208
208
209
- private def comment (factory: Expr [XmlFactory ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
209
+ private def comment (factory: Expr [XmlFactory [_] ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
210
210
(
211
211
isString(" <!--" )
212
212
~> (
@@ -223,7 +223,7 @@ private[xml] object XmlParser {
223
223
})
224
224
}
225
225
226
- private def processingInstruction (factory: Expr [XmlFactory ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
226
+ private def processingInstruction (factory: Expr [XmlFactory [_] ])(using Quotes ): Interpolator [quotes.reflect.Term ] = {
227
227
(
228
228
isString(" <?" )
229
229
~> xmlName.filter(_ != " xml" , " not `xml`" )
@@ -242,7 +242,7 @@ private[xml] object XmlParser {
242
242
})
243
243
}
244
244
245
- private def fragment (factory: Expr [XmlFactory ], nsb : NamespaceBinding )(using Quotes ): Interpolator [List [quotes.reflect.Term ]] = {
245
+ private def fragment (factory: Expr [XmlFactory [_] ], nsb : NamespaceBinding )(using Quotes ): Interpolator [List [quotes.reflect.Term ]] = {
246
246
(
247
247
interpolation(factory) <|>
248
248
entity(factory) <|>
@@ -254,7 +254,7 @@ private[xml] object XmlParser {
254
254
).repeat()
255
255
}
256
256
257
- private def elem (factory: Expr [XmlFactory ], nsb: NamespaceBinding )(using Quotes ): Interpolator [quotes.reflect.Term ] = {
257
+ private def elem (factory: Expr [XmlFactory [_] ], nsb: NamespaceBinding )(using Quotes ): Interpolator [quotes.reflect.Term ] = {
258
258
import quotes .reflect ._
259
259
(
260
260
isString(" <" ) ~>
@@ -341,7 +341,7 @@ private[xml] object XmlParser {
341
341
}
342
342
343
343
344
- def interpolate (sc: Expr [scala.StringContext ], args: Expr [Seq [Any ]], factory: Expr [XmlFactory ] )(using Quotes ): Expr [Any ] = {
344
+ def interpolate [ Z ] (sc: Expr [scala.StringContext ], args: Expr [Seq [Any ]], factory: Expr [XmlFactory [ Z ]] )(using Type [ Z ], Quotes ): Expr [Z ] = {
345
345
import quotes .reflect .*
346
346
val (factoryExpr, factoryType) = factory match {case ' { $x : t } => ((x, Type .of[t])) }
347
347
@@ -355,7 +355,7 @@ private[xml] object XmlParser {
355
355
.selectAndApplyToArgsMaybeDynamicMaybeVarargs
356
356
(" literal" )
357
357
((fragment(factoryExpr, initialNsb) <~> end).interpolate(sc, args))
358
- .asExpr
358
+ .asExprOf[ Z ]
359
359
}
360
360
361
361
def classSymbolThatDoesntResultInBadSymbolicReferenceWhenLookingForAnObjectContainedClass (name: String )(using Quotes ): quotes.reflect.Symbol = {
0 commit comments