1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-02-16 18:30:37 +00:00

- Removed unnecessary tests and logic for bank directive parsing.

- Retested all test cases.
This commit is contained in:
Sven Van de Velde 2023-04-11 14:44:35 +02:00
parent 477499b97b
commit 5c5ffd2736

View File

@ -1257,17 +1257,9 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
@Override
public Object visitDirectiveBank(KickCParser.DirectiveBankContext ctx) {
String bankArea = "";
Long bank = -1L;
if(this.currentBank != null) {
bankArea = this.currentBank.getBankArea();
bank = this.currentBank.getBank();
}
if(ctx.getChildCount() >= 5) {
bankArea = ctx.getChild(2).getText();
bank = Long.valueOf(ctx.getChild(4).getText());
}
String bankArea = ctx.getChild(2).getText();
Long bank = Long.valueOf(ctx.getChild(4).getText());
return new Directive.Bank(bankArea, bank);
}