Logic unit control

This commit is contained in:
Anuken
2020-10-05 15:42:37 -04:00
parent 8e49d73765
commit 7088ae89b3
37 changed files with 661 additions and 202 deletions

View File

@@ -43,9 +43,9 @@ public class LogicStatementProcessor extends BaseProcessor{
String name = c.annotation(RegisterStatement.class).value();
if(beganWrite){
writer.nextControlFlow("else if(obj instanceof $T)", c.mirror());
writer.nextControlFlow("else if(obj.getClass() == $T.class)", c.mirror());
}else{
writer.beginControlFlow("if(obj instanceof $T)", c.mirror());
writer.beginControlFlow("if(obj.getClass() == $T.class)", c.mirror());
beganWrite = true;
}
@@ -53,6 +53,7 @@ public class LogicStatementProcessor extends BaseProcessor{
writer.addStatement("out.append($S)", name);
Seq<Svar> fields = c.fields();
fields.addAll(c.superclass().fields());
String readSt = "if(tokens[0].equals($S))";
if(beganRead){