This commit is contained in:
Friendseeker 2024-10-21 16:21:45 -07:00 committed by Jerry Tan
parent b1c4c09a7f
commit cdab4c10be
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ object JLineTest {
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")
case _ => failure("Unexpected pattern")
}
val parsers = Map("1" -> one, "2" -> two, "3" -> three, "4" -> four, "5" -> five)