diff options
author | geno <gabriele.genovese2@studio.unibo.it> | 2024-06-30 13:36:37 +0200 |
---|---|---|
committer | geno <gabriele.genovese2@studio.unibo.it> | 2024-06-30 13:36:37 +0200 |
commit | afff6a80cd58f7787efa1398f7c8cbdce8989323 (patch) | |
tree | e6021201d6e7049da640687c7ce61c898aaea4d8 /src/Main.java | |
parent | aaa97e2e41c0aa17a6f99099dd39bb73a935fe02 (diff) |
fixed warnings, better formatting, final added where possible
Diffstat (limited to 'src/Main.java')
-rw-r--r-- | src/Main.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main.java b/src/Main.java index 4f5d45f..f53b410 100644 --- a/src/Main.java +++ b/src/Main.java @@ -54,7 +54,7 @@ public class Main { Node ast = visitor.visit(tree); ArrayList<SemanticError> errorsWithDup = ast.checkSemantics(ST, 0); ArrayList<SemanticError> errors = Share.removeDuplicates(errorsWithDup); - if (errors.size() > 0) { + if (!errors.isEmpty()) { System.out.println("You had " + errors.size() + " errors:"); for (SemanticError e : errors) { System.out.println("\t" + e); |