diff options
Diffstat (limited to 'stage1/Stage1Lib.scala')
-rw-r--r-- | stage1/Stage1Lib.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala index c42ee12..aa7b497 100644 --- a/stage1/Stage1Lib.scala +++ b/stage1/Stage1Lib.scala @@ -12,7 +12,10 @@ import java.util.{Set=>_,Map=>_,List=>_,_} import javax.xml.bind.annotation.adapters.HexBinaryAdapter // CLI interop -case class ExitCode(integer: Int) +case class ExitCode(integer: Int){ + def ||( other: => ExitCode ) = if( this == ExitCode.Success ) this else other + def &&( other: => ExitCode ) = if( this != ExitCode.Success ) this else other +} object ExitCode{ val Success = ExitCode(0) val Failure = ExitCode(1) |