Fix issue #63 for block comments not terminating at an EOF

This commit is contained in:
Ginger Bill
2017-05-09 10:01:10 +01:00
parent 7692061eef
commit 64b5afd820
8 changed files with 45 additions and 33 deletions

View File

@@ -1,19 +1,3 @@
#import "fmt.odin";
#import "os.odin";
main :: proc() {
immutable program := "+ + * - /";
accumulator := 0;
for token in program {
match token {
case '+': accumulator += 1;
case '-': accumulator -= 1;
case '*': accumulator *= 2;
case '/': accumulator /= 2;
default: // Ignore everything else
}
}
fmt.printf("The program \"%s\" calculates the value %d\n", program, accumulator);
/*
}