Skip to content

Commit 2ef31b8

Browse files
committed
Ready for Release 0.40.3
1 parent 92284c6 commit 2ef31b8

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Driver.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ int main(const string[] args) {
1919
}
2020
auto symtab = new SymbolTable(cast(Edition)edition);
2121
auto lexer = new LexerImpl(symtab);
22-
stderr.writeln("BASIC The ", to!string(symtab.edition), symtab.edition > MAX_SUPPORTED_EDITION ? " (not yet implemented)" : "");
22+
stderr.writeln("BASIC The ", to!string(symtab.edition),
23+
symtab.edition > MAX_SUPPORTED_EDITION ? " (not yet implemented)" : "");
2324
auto head = new Node(symtab);
2425
auto parser = new Parser(lexer, symtab, head);
2526
auto msg = collectExceptionMsg(parser.parse());

Expr.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import std.stdio : writeln, write;
22
import Node : Node;
33
import SymbolTable : SymbolTable, Edition;
44

5-
public enum Op { Add, Sub, Mul, Div, Exp, Neg };
5+
public enum Op { Add, Sub, Mul, Div, Exp, Neg }
66
public immutable int number_fp_regs = 8;
77

88
class Expr : Node {
9-
protected enum Register { Available, InUse, Reserved };
9+
protected enum Register { Available, InUse, Reserved }
1010
static private Register[number_fp_regs] regs;
1111
static void clearRegs() {
1212
regs[0] = regs[1] = Register.Reserved; // d0, d1, s0, s1, s2, s3
@@ -17,7 +17,7 @@ class Expr : Node {
1717
}
1818
}
1919
static int allocateReg() {
20-
for (int r = regs.length - 1; r >= 0; --r) {
20+
for (int r = number_fp_regs - 1; r >= 0; --r) {
2121
if (regs[r] == Register.Available) {
2222
regs[r] = Register.InUse;
2323
return r;

Node.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,17 +481,17 @@ class For : Node {
481481
if (stack.length == 0) {
482482
return -1;
483483
}
484-
int id = stack[$ - 1];
484+
int popped = stack[$ - 1];
485485
stack = stack[0 .. $ - 1];
486-
return id;
486+
return popped;
487487
}
488488
static int popID() {
489489
if (ident_stack.length == 0) {
490490
return -1;
491491
}
492-
int id = ident_stack[$ - 1];
492+
int popped_id = ident_stack[$ - 1];
493493
ident_stack = ident_stack[0 .. $ - 1];
494-
return id;
494+
return popped_id;
495495
}
496496
this(int i, Expr b, Expr e, Expr s) {
497497
left = new Node(new Node(b, e), s);

0 commit comments

Comments
 (0)