fix flow keyword issues

This commit is contained in:
dfsek
2020-12-31 02:44:33 -07:00
parent 792b6efd12
commit 0c3e3f2bc6
6 changed files with 19 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
import java.util.Random;
public class BreakKeyword implements Keyword<Block.ReturnLevel> {
public class BreakKeyword implements Keyword<Block.ReturnInfo<?>> {
private final Position position;
public BreakKeyword(Position position) {
@@ -16,8 +16,8 @@ public class BreakKeyword implements Keyword<Block.ReturnLevel> {
}
@Override
public Block.ReturnLevel apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return Block.ReturnLevel.BREAK;
public Block.ReturnInfo<?> apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return new Block.ReturnInfo<>(Block.ReturnLevel.BREAK, null);
}
@Override

View File

@@ -8,7 +8,7 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
import java.util.Random;
public class ContinueKeyword implements Keyword<Block.ReturnLevel> {
public class ContinueKeyword implements Keyword<Block.ReturnInfo<?>> {
private final Position position;
public ContinueKeyword(Position position) {
@@ -16,8 +16,8 @@ public class ContinueKeyword implements Keyword<Block.ReturnLevel> {
}
@Override
public Block.ReturnLevel apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return Block.ReturnLevel.CONTINUE;
public Block.ReturnInfo<?> apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return new Block.ReturnInfo<>(Block.ReturnLevel.CONTINUE, null);
}
@Override

View File

@@ -8,7 +8,7 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
import java.util.Random;
public class FailKeyword implements Keyword<Block.ReturnLevel> {
public class FailKeyword implements Keyword<Block.ReturnInfo<?>> {
private final Position position;
public FailKeyword(Position position) {
@@ -16,8 +16,8 @@ public class FailKeyword implements Keyword<Block.ReturnLevel> {
}
@Override
public Block.ReturnLevel apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return Block.ReturnLevel.FAIL;
public Block.ReturnInfo<?> apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return new Block.ReturnInfo<>(Block.ReturnLevel.FAIL, null);
}
@Override

View File

@@ -8,7 +8,7 @@ import com.dfsek.terra.api.structures.tokenizer.Position;
import java.util.Random;
public class ReturnKeyword implements Keyword<Block.ReturnLevel> {
public class ReturnKeyword implements Keyword<Block.ReturnInfo<?>> {
private final Position position;
public ReturnKeyword(Position position) {
@@ -16,8 +16,8 @@ public class ReturnKeyword implements Keyword<Block.ReturnLevel> {
}
@Override
public Block.ReturnLevel apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return Block.ReturnLevel.RETURN;
public Block.ReturnInfo<?> apply(Buffer buffer, Rotation rotation, Random random, int recursions) {
return new Block.ReturnInfo<>(Block.ReturnLevel.RETURN, null);
}
@Override