mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-17 22:00:08 +00:00
Make Pair a record
This commit is contained in:
@@ -121,11 +121,11 @@ public class Scope {
|
||||
}
|
||||
|
||||
public int getIndex(String id) {
|
||||
return indices.get(id).getLeft();
|
||||
return indices.get(id).left();
|
||||
}
|
||||
|
||||
public ReturnType getType(String id) {
|
||||
return indices.get(id).getRight();
|
||||
return indices.get(id).right();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ public class IfKeyword implements Keyword<Block.ReturnInfo<?>> {
|
||||
if(statement.apply(implementationArguments, scope)) return conditional.apply(implementationArguments, scope);
|
||||
else {
|
||||
for(Pair<Returnable<Boolean>, Block> pair : elseIf) {
|
||||
if(pair.getLeft().apply(implementationArguments, scope)) {
|
||||
return pair.getRight().apply(implementationArguments, scope);
|
||||
if(pair.left().apply(implementationArguments, scope)) {
|
||||
return pair.right().apply(implementationArguments, scope);
|
||||
}
|
||||
}
|
||||
if(elseBlock != null) return elseBlock.apply(implementationArguments, scope);
|
||||
|
||||
Reference in New Issue
Block a user