Fix bunch more compiler errors

This commit is contained in:
Friendseeker 2024-10-21 16:12:11 -07:00 committed by Jerry Tan
parent 375e4f1d2e
commit b1c4c09a7f
2 changed files with 3 additions and 1 deletions

View File

@ -18,9 +18,10 @@ object JLineTest {
val four = token("color" ~> Space) ~> token(ID, "<color name>")
val num = token(NatBasic)
val five = (num ~ token("+" | "-") ~ num) <~ token('=') collect {
val five = (num ~ token("+" | "-") ~ num) <~ token('=') flatMap {
case a ~ "+" ~ b => token((a + b).toString)
case a ~ "-" ~ b => token((a - b).toString)
case _ => failure("Unexpected pattern")
}
val parsers = Map("1" -> one, "2" -> two, "3" -> three, "4" -> four, "5" -> five)

View File

@ -16,6 +16,7 @@ import java.util.Properties
import java.util.concurrent.ForkJoinPool
import java.util.concurrent.atomic.AtomicBoolean
import sbt.BasicCommandStrings.JavaClient
import sbt.Project.LoadAction
import sbt.ProjectExtra.*
import sbt.internal.Aggregation.AnyKeys