Ver código fonte

Removed unnecessary Field in ExpressionVisitor

kindlich 6 anos atrás
pai
commit
a782c2a145
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados

+ 4
- 4
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaExpressionVisitor.java Ver arquivo

@@ -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 Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar