Skip to content

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
These functions are not used anymore.
  • Loading branch information
saig0 committed Jul 17, 2023
1 parent 147c41d commit 5959e58
Showing 1 changed file with 0 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,34 +329,11 @@ class FeelInterpreter {
case _ => error(EvaluationFailureType.INVALID_TYPE, s"expected String but found '$x'")
}

private def withDates(x: Val, y: Val, f: (Date, Date) => Val): Val =
withDate(x, x => {
withDate(y, y => {
f(x, y)
})
})

private def withDate(x: Val, f: Date => Val)(implicit context: EvalContext): Val = x match {
case ValDate(x) => f(x)
case _ => error(EvaluationFailureType.INVALID_TYPE, s"Expected Date but found '$x'")
}

private def withTimes(x: Val, y: Val, f: (Time, Time) => Val): Val =
withTime(x, x => {
withTime(y, y => {
f(x, y)
})
})

private def withLocalTimes(x: Val,
y: Val,
f: (LocalTime, LocalTime) => Val): Val =
withLocalTime(x, x => {
withLocalTime(y, y => {
f(x, y)
})
})

private def withLocalTime(x: Val, f: LocalTime => Val)(implicit context: EvalContext): Val = x match {
case ValLocalTime(x) => f(x)
case _ => error(EvaluationFailureType.INVALID_TYPE, s"Expected Local Time but found '$x'")
Expand All @@ -367,25 +344,6 @@ class FeelInterpreter {
case _ => error(EvaluationFailureType.INVALID_TYPE, s"Expected Time but found '$x'")
}

private def withDateTimes(x: Val,
y: Val,
f: (DateTime, DateTime) => Val): Val =
withDateTime(x, x => {
withDateTime(y, y => {
f(x, y)
})
})

private def withLocalDateTimes(
x: Val,
y: Val,
f: (LocalDateTime, LocalDateTime) => Val): Val =
withLocalDateTime(x, x => {
withLocalDateTime(y, y => {
f(x, y)
})
})

private def withDateTime(x: Val, f: DateTime => Val)(implicit context: EvalContext): Val = x match {
case ValDateTime(x) => f(x)
case _ => error(EvaluationFailureType.INVALID_TYPE, s"Expected Date Time but found '$x'")
Expand All @@ -397,26 +355,6 @@ class FeelInterpreter {
case _ => error(EvaluationFailureType.INVALID_TYPE, s"Expected Local Date Time but found '$x'")
}

private def withYearMonthDurations(
x: Val,
y: Val,
f: (YearMonthDuration, YearMonthDuration) => Val): Val =
withYearMonthDuration(x, x => {
withYearMonthDuration(y, y => {
f(x, y)
})
})

private def withDayTimeDurations(
x: Val,
y: Val,
f: (DayTimeDuration, DayTimeDuration) => Val): Val =
withDayTimeDuration(x, x => {
withDayTimeDuration(y, y => {
f(x, y)
})
})

private def withYearMonthDuration(x: Val, f: YearMonthDuration => Val)(implicit context: EvalContext): Val =
x match {
case ValYearMonthDuration(x) => f(x)
Expand Down

0 comments on commit 5959e58

Please sign in to comment.