fixed compilation issues and Bug

This commit is contained in:
2025-10-04 16:27:26 +02:00
parent 50715b852d
commit 9b49a52b8f
3 changed files with 3 additions and 4 deletions

View File

@@ -9,8 +9,8 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<properties> <properties>
<maven.compiler.source>25</maven.compiler.source> <maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target> <maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>

View File

@@ -13,7 +13,7 @@ import java.util.List;
public class Lox { public class Lox {
private static boolean hadError = false; private static boolean hadError = false;
static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
if (args.length > 1){ if (args.length > 1){
System.exit(64); System.exit(64);
} }

View File

@@ -107,7 +107,6 @@ class Scanner {
} else { } else {
Lox.error(line, "Unexpected character."); Lox.error(line, "Unexpected character.");
} }
Lox.error(line, "Unexpected character.");
break; break;
} }
} }