summaryrefslogtreecommitdiff
path: root/src/semanticanalysis
diff options
context:
space:
mode:
authorEmanuele Grasso <96300448+L0P0P@users.noreply.github.com>2024-07-06 09:47:25 +0200
committerGitHub <noreply@github.com>2024-07-06 09:47:25 +0200
commitf0692ff5f9e39cbd1c203e9d5abebf55a3d0f6fc (patch)
tree36518af3f04a751ba5bb8158c3f005cfa3e8c7c3 /src/semanticanalysis
parent8aa8b5834953cab15c0687608f4fafea2e6c61be (diff)
Fixed the print of the ast and some warnings (#19)
Co-authored-by: Santo Cariotti <santo@dcariotti.me>
Diffstat (limited to 'src/semanticanalysis')
-rw-r--r--src/semanticanalysis/Share.java2
-rw-r--r--src/semanticanalysis/SymbolTable.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/semanticanalysis/Share.java b/src/semanticanalysis/Share.java
index 7542cf7..a05c4c5 100644
--- a/src/semanticanalysis/Share.java
+++ b/src/semanticanalysis/Share.java
@@ -10,7 +10,7 @@ public class Share {
* generic because it's used a custom contains function.
*/
public static ArrayList<SemanticError> removeDuplicates(ArrayList<SemanticError> list) {
- ArrayList<SemanticError> newList = new ArrayList();
+ ArrayList<SemanticError> newList = new ArrayList<>();
for (SemanticError element : list) {
if (!customContains(newList, element)) {
diff --git a/src/semanticanalysis/SymbolTable.java b/src/semanticanalysis/SymbolTable.java
index b620af7..50309a5 100644
--- a/src/semanticanalysis/SymbolTable.java
+++ b/src/semanticanalysis/SymbolTable.java
@@ -15,8 +15,8 @@ public class SymbolTable {
private final ArrayList<Integer> offset;
public SymbolTable() {
- this.symbolTable = new ArrayList();
- this.offset = new ArrayList();
+ this.symbolTable = new ArrayList<>();
+ this.offset = new ArrayList<>();
}
/**