Skip to content

Commit

Permalink
Moved Realm
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Feb 19, 2024
1 parent 01666d3 commit d353080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/kaleidoscope.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import java.util.regex.*

import language.experimental.captureChecking

given Realm = realm"kaleidoscope"

extension (inline ctx: StringContext)
transparent inline def r: Any = ${Kaleidoscope.regex('ctx)}
transparent inline def g: Any = ${Kaleidoscope.glob('ctx)}
Expand All @@ -48,6 +46,8 @@ class Extractor[ResultType](parts: Seq[String]):
else result2.map(Tuple.fromArray(_)).asInstanceOf[ResultType]

object Kaleidoscope:
given Realm = realm"kaleidoscope"

def glob(sc: Expr[StringContext])(using Quotes): Expr[Any] =
val parts = sc.value.get.parts.map(Text(_)).map(Glob.parse(_).regex.s).to(List)

Expand Down

0 comments on commit d353080

Please sign in to comment.