File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ object Main extends App {
89
89
case List ( " " ) =>
90
90
if (vm.fail)
91
91
vm.run( block ) match {
92
+ case Some ( r ) if r isEmpty => println( " yes" )
92
93
case Some ( r ) => println( displayResult(r) )
93
94
case None => println( " no" )
94
95
}
@@ -110,7 +111,11 @@ object Main extends App {
110
111
111
112
val result = if (all) vm.runall( block ) else vm.runfirst( block ).toList
112
113
113
- println( result map displayResult mkString " \n\n " )
114
+ result match {
115
+ case Nil => println( " no" )
116
+ case List ( r ) if r isEmpty => println( " yes" )
117
+ case _ => println( result map displayResult mkString " \n\n " )
118
+ }
114
119
case m : Parser .Mismatch => m.error
115
120
}
116
121
}
Original file line number Diff line number Diff line change @@ -375,6 +375,7 @@ class VM( prog: Program ) {
375
375
frame = new Frame ( vars.count, - 1 , null )
376
376
pb = block
377
377
pc = 0
378
+ success = true
378
379
run( block )
379
380
}
380
381
You can’t perform that action at this time.
0 commit comments