Sfoglia il codice sorgente

Removed unnecessary Field in ExpressionVisitor

kindlich 6 anni fa
parent
commit
a782c2a145
Non sono state trovate chiavi note per questa firma nel database

+ 4
- 4
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaExpressionVisitor.java Vedi File

@@ -8,10 +8,10 @@ import org.openzen.zenscript.javabytecode.JavaMethodInfo;
8 8
 
9 9
 public class JavaExpressionVisitor implements ExpressionVisitor<Void> {
10 10
 
11
-    private final JavaStatementVisitor statementVisitor;
11
+    private JavaWriter javaWriter;
12 12
 
13
-    public JavaExpressionVisitor(JavaStatementVisitor statementVisitor) {
14
-        this.statementVisitor = statementVisitor;
13
+    public JavaExpressionVisitor(final JavaWriter javaWriter) {
14
+        this.javaWriter = javaWriter;
15 15
     }
16 16
 
17 17
     @Override
@@ -319,7 +319,7 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void> {
319 319
     }
320 320
 
321 321
     public JavaWriter getJavaWriter() {
322
-        return statementVisitor.getJavaWriter();
322
+        return javaWriter;
323 323
     }
324 324
 
325 325
 

+ 1
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaStatementVisitor.java Vedi File

@@ -9,7 +9,7 @@ public class JavaStatementVisitor implements StatementVisitor<Void> {
9 9
     public JavaStatementVisitor(final JavaWriter javaWriter) {
10 10
 
11 11
         this.javaWriter = javaWriter;
12
-        this.expressionVisitor = new JavaExpressionVisitor( this);
12
+        this.expressionVisitor = new JavaExpressionVisitor( javaWriter);
13 13
     }
14 14
 
15 15
     @Override

Loading…
Annulla
Salva