Skip to content
Snippets Groups Projects
Commit b3e14705 authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos Committed by Etienne Kneuss
Browse files

Some more constructors

parent 28424994
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,18 @@ object Constructors {
case Seq(elem) => elem
case more => Tuple(more)
}
def tuplePatternWrap(ps: Seq[Pattern]) = ps match {
case Seq() => LiteralPattern(None, UnitLiteral())
case Seq(elem) => elem
case more => TuplePattern(None, more)
}
def tupleTypeWrap(tps : Seq[TypeTree]) = tps match {
case Seq() => UnitType
case Seq(elem) => elem
case more => TupleType(more)
}
private def filterCases(scrutType : TypeTree, cases: Seq[MatchCase]): Seq[MatchCase] = {
scrutType match {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment