val childArgument = Argument(Right("child"), Some(Argument(Left(a._1._1.toInt), None)))
val optionalArgument = if (a._2.nonEmpty) {
Some(Argument(Left(if (a._2.get._2) 1 else 0), None))
} else
None
if (optionalArgument.nonEmpty) {
List(childArgument, optionalArgument.get)
} else {
List(childArgument)
}
}
```
def booleanLit: Parser[Boolean] = "true" ^^ { _ => true } | "false" ^^ { _ => false}
this is how it was solved. there were three cases child(1), child(1);false and child(1);true