Browse Source

Removed unnecessary Field in ExpressionVisitor

kindlich 6 years ago
parent
commit
a782c2a145
No known key found for this signature in database

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

8
 
8
 
9
 public class JavaExpressionVisitor implements ExpressionVisitor<Void> {
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
     @Override
17
     @Override
319
     }
319
     }
320
 
320
 
321
     public JavaWriter getJavaWriter() {
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 View File

9
     public JavaStatementVisitor(final JavaWriter javaWriter) {
9
     public JavaStatementVisitor(final JavaWriter javaWriter) {
10
 
10
 
11
         this.javaWriter = javaWriter;
11
         this.javaWriter = javaWriter;
12
-        this.expressionVisitor = new JavaExpressionVisitor( this);
12
+        this.expressionVisitor = new JavaExpressionVisitor( javaWriter);
13
     }
13
     }
14
 
14
 
15
     @Override
15
     @Override

Loading…
Cancel
Save