@@ -70,10 +70,6 @@ public static class SemanticResult {
7070 this .parseResult = parseResult ;
7171 this .semanticError = semanticError ;
7272 }
73-
74- public boolean hasErrors () {
75- return parseResult .hasErrors () || semanticError ;
76- }
7773 }
7874
7975 @ SuppressWarnings ("unchecked" )
@@ -198,17 +194,17 @@ public static String compileAndRun(String source) throws Exception {
198194 return compileAndRun (source , "" );
199195 }
200196
201- public static String runVM (File objFile , String input ) throws Exception {
197+ public static String runVM (File objFile , String input ) {
202198 var originalIn = System .in ;
203199 var originalOut = System .out ;
204200 try {
205201 System .setIn (new ByteArrayInputStream (input .getBytes (StandardCharsets .UTF_8 )));
206- var baos = new ByteArrayOutputStream ();
207- System .setOut (new PrintStream (baos , true , StandardCharsets .UTF_8 ));
202+ var outputStream = new ByteArrayOutputStream ();
203+ System .setOut (new PrintStream (outputStream , true , StandardCharsets .UTF_8 ));
208204
209205 Run .main (new String [] {objFile .getAbsolutePath ()});
210206
211- var output = baos .toString (StandardCharsets .UTF_8 );
207+ var output = outputStream .toString (StandardCharsets .UTF_8 );
212208 var completionIndex = output .indexOf ("\n Completion took" );
213209 if (completionIndex >= 0 ) {
214210 output = output .substring (0 , completionIndex );
0 commit comments