Skip to content

Commit

Permalink
Updates for Contingency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jul 5, 2024
1 parent b3469f2 commit 08ef20c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/kaleidoscope.Kaleidoscope.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object Kaleidoscope:
private def extractor(parts: List[String])(using Quotes): Expr[Any] =
import quotes.reflect.*

val regex = failCompilation(Regex.parse(parts.map(Text(_))))
val regex = abandonment(Regex.parse(parts.map(Text(_))))

val types: List[TypeRepr] = regex.captureGroups.map(_.quantifier).map:
case Regex.Quantifier.Exactly(1) => TypeRepr.of[Text]
Expand Down
2 changes: 1 addition & 1 deletion src/core/kaleidoscope.Regex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ object Regex:
else (index2, s"($groupName($subpattern)${quantifier.serialize}${greed.serialize})".tt)

def make(parts: Seq[String])(using Unsafe): Regex =
import errorHandlers.throwUnsafely
import strategies.throwUnsafely
parse(parts.to(List).map(_.tt))

def apply(text: Text): Regex raises RegexError = parse(List(text))
Expand Down
2 changes: 1 addition & 1 deletion src/test/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import rudiments.*
import spectacular.*
import vacuous.*

import errorHandlers.throwUnsafely
import strategies.throwUnsafely

object Tests extends Suite(t"Kaleidoscope tests"):
def run(): Unit =
Expand Down

0 comments on commit 08ef20c

Please sign in to comment.